Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(84)

Unified Diff: third_party/WebKit/LayoutTests/csspaint/resources/test-runner-geometry-logging.js

Issue 2868003002: CSSPaint: Move layout tests in csspaint/ to http/tests/csspaint/ (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/csspaint/resources/test-runner-geometry-logging.js
diff --git a/third_party/WebKit/LayoutTests/csspaint/resources/test-runner-geometry-logging.js b/third_party/WebKit/LayoutTests/csspaint/resources/test-runner-geometry-logging.js
deleted file mode 100644
index e2ce067986bcbba50ed35df7a37016f551734183..0000000000000000000000000000000000000000
--- a/third_party/WebKit/LayoutTests/csspaint/resources/test-runner-geometry-logging.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Test runner for the paint worklet.
-//
-// Calls a given function with a newly created element, and prints the expected
-// geometry to the console.
-//
-// Runs each test sequentially after a layout and a paint.
-//
-// Usage:
-// testRunnerGeometryLogging([{
-// func: function(el) {
-// el.style.width = '100px';
-// el.style.height = '100px';
-// },
-// expected: {width: 100, height: 100},
-// ]);
-
-function testRunnerGeometryLogging(tests, workletCode) {
- if (window.testRunner) {
- testRunner.waitUntilDone();
- testRunner.dumpAsText();
- }
-
- paintWorklet.addModule('resources/paint-logging-green.js').then(function() {
- tests.reduce(function(chain, obj) {
- return chain.then(function() {
- console.log('The worklet should log: \'width: ' + obj.expected.width + ', height: ' + obj.expected.height + '\'');
- var el = document.createElement('div');
- document.body.appendChild(el);
- obj.func(el);
- return new Promise(function(resolve) {
- runAfterLayoutAndPaint(function() {
- document.body.removeChild(el);
- resolve();
- });
- });
- });
- }, Promise.resolve()).then(function() {
- if (window.testRunner) {
- testRunner.notifyDone();
- }
- });
- });
-}

Powered by Google App Engine
This is Rietveld 408576698