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

Unified Diff: LayoutTests/fast/canvas/resources/canvas-composite-image-common.js

Issue 530723003: canvas2d.drawImage(video) doesn't composite correctly. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: mark fast/canvas/canvas-composite-repaint-by-all-imagesource.html to NeedsRebaseline Created 6 years, 2 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: LayoutTests/fast/canvas/resources/canvas-composite-image-common.js
diff --git a/LayoutTests/fast/canvas/resources/canvas-composite-image-common.js b/LayoutTests/fast/canvas/resources/canvas-composite-image-common.js
index e5e3ae7f44eef07e7470afdbd5dce1f3b2c346ab..d49caf2ee7a75b6a90321e901895927744bc5eef 100644
--- a/LayoutTests/fast/canvas/resources/canvas-composite-image-common.js
+++ b/LayoutTests/fast/canvas/resources/canvas-composite-image-common.js
@@ -1,5 +1,4 @@
if (window.testRunner) {
- testRunner.dumpAsText();
testRunner.waitUntilDone();
}
@@ -353,7 +352,14 @@ function checkResult(context, compositeIndex, testIndex) {
addOutput('div', 'pass', 'PASS');
}
-function runTest() {
+function runTest(testMode) {
+ if (window.testRunner) {
+ if (testMode == "dumpAsText") {
+ testRunner.dumpAsText();
+ } else if (testMode == "dumpAsTextWithPixelResults") {
+ testRunner.dumpAsTextWithPixelResults();
+ }
+ }
setupTest();
createOutputTable();
for (var i = 0; i < compositeTypes.length; i++) {
@@ -365,15 +371,18 @@ function runTest() {
context.restore();
}
}
- for (var i = 0; i < compositeTypes.length; i++) {
- addOutput('h1', '', 'Mode: ' + compositeTypes[i]);
- for (var j = 0; j < testNames.length; j++) {
- addOutput('h2', '', 'Test: ' + testNames[j]);
- var context = getContext(i, j);
- checkResult(context, i, j);
- //rebaseline(context, i, j);
+
+ if (testMode == "dumpAsText") {
+ for (var i = 0; i < compositeTypes.length; i++) {
+ addOutput('h1', '', 'Mode: ' + compositeTypes[i]);
+ for (var j = 0; j < testNames.length; j++) {
+ addOutput('h2', '', 'Test: ' + testNames[j]);
+ var context = getContext(i, j);
+ checkResult(context, i, j);
+ //rebaseline(context, i, j);
+ }
}
}
- if (testRunner)
+ if (window.testRunner)
testRunner.notifyDone();
}
« no previous file with comments | « LayoutTests/fast/canvas/canvas-composite-video-expected.txt ('k') | Source/core/html/canvas/CanvasRenderingContext2D.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698