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

Unified Diff: LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js

Issue 196353013: Convert some repaint tests to not call display() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More expectations, remove do-not-repaint tricky test Created 6 years, 9 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/script-tests/canvas-imageSmoothingEnabled-repaint.js
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js b/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js
index cf1ef387fb356b3fc19334969394949d22e8b486..01388952f5f9b26ff242c6147781021bab86dd69 100644
--- a/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js
+++ b/LayoutTests/fast/canvas/script-tests/canvas-imageSmoothingEnabled-repaint.js
@@ -23,49 +23,33 @@ function draw()
function testResult() {
debug("Test that the image is not filtered");
- left_of_center_pixel = dstCtx.getImageData(149, 150, 1, 1);
- shouldBe("left_of_center_pixel.data[0]", "255");
- shouldBe("left_of_center_pixel.data[1]", "0");
- shouldBe("left_of_center_pixel.data[2]", "0");
- right_of_center_pixel = dstCtx.getImageData(150, 150, 1, 1);
- shouldBe("right_of_center_pixel.data[0]", "0");
- shouldBe("right_of_center_pixel.data[1]", "255");
- shouldBe("right_of_center_pixel.data[2]", "0");
+ left_of_center_pixel = dstCtx.getImageData(149, 150, 1, 1);
+ shouldBe("left_of_center_pixel.data[0]", "255");
+ shouldBe("left_of_center_pixel.data[1]", "0");
+ shouldBe("left_of_center_pixel.data[2]", "0");
+ right_of_center_pixel = dstCtx.getImageData(150, 150, 1, 1);
+ shouldBe("right_of_center_pixel.data[0]", "0");
+ shouldBe("right_of_center_pixel.data[1]", "255");
+ shouldBe("right_of_center_pixel.data[2]", "0");
finishJSTest();
}
// Bug 89018 requires 2 draw iteration in order to manifest itself.
var drawIterations = 2;
-// Unrolled repaint loop for running the test in DumpRenderTree
-function TestControllerPaint() {
- while (drawIterations > 0) {
- draw();
- testRunner.display();
- drawIterations = drawIterations - 1;
- }
- draw();
- testResult();
-}
-
-// Repaint loop for running the test in the browser
function BrowserPaint(){
draw();
- if (drawIterations > 0) {
- drawIterations = drawIterations - 1;
- window.requestAnimationFrame(BrowserPaint);
+ if (drawIterations > 0) {
+ drawIterations = drawIterations - 1;
+ window.requestAnimationFrame(BrowserPaint);
} else {
- testResult();
- }
+ testResult();
+ }
}
function onLoadHandler()
{
- if (window.testRunner) {
- TestControllerPaint();
- } else {
- BrowserPaint();
- }
+ BrowserPaint();
}
window.jsTestIsAsync = true;

Powered by Google App Engine
This is Rietveld 408576698