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

Unified Diff: LayoutTests/fast/canvas/fill-stroke-clip-reset-path.html

Issue 187393007: Convert some pixel tests in fast/canvas into ref tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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/fill-stroke-clip-reset-path.html
diff --git a/LayoutTests/fast/canvas/fill-stroke-clip-reset-path.html b/LayoutTests/fast/canvas/fill-stroke-clip-reset-path.html
index 1b5b01fad240fa0760f1eb725be7f783e52a7675..126ed9e7f880bf1fdd47a31ea5adefdfa5c28b01 100644
--- a/LayoutTests/fast/canvas/fill-stroke-clip-reset-path.html
+++ b/LayoutTests/fast/canvas/fill-stroke-clip-reset-path.html
@@ -1,18 +1,11 @@
<html>
<head>
<script>
-function testOne(operation, quirk)
+function testOne(operation)
{
- if (window.testRunner){
- testRunner.dumpAsTextWithPixelResults();
- if (testRunner.setUseDashboardCompatibilityMode)
- testRunner.setUseDashboardCompatibilityMode(quirk);
- }
+ var context = document.getElementById(operation).getContext('2d');
- var canvas = document.getElementById(operation + "-" + (quirk ? "" : "no-") + "quirk");
- var context = canvas.getContext('2d');
-
- context.fillStyle = quirk ? "green" : "red";
+ context.fillStyle = "red";
context.fillRect(0, 0, 1000, 1000);
context.moveTo(0, 0);
@@ -22,28 +15,21 @@ function testOne(operation, quirk)
context.closePath();
context[operation]();
- context.fillStyle = quirk ? "red" : "green";
+ context.fillStyle = "green";
context.fill();
}
function test()
{
- testOne("fill", false);
- testOne("stroke", false);
- testOne("clip", false);
- testOne("fill", true);
- testOne("stroke", true);
- testOne("clip", true);
+ testOne("fill");
+ testOne("stroke");
+ testOne("clip");
}
</script>
</head>
<body onload="test()">
<p>All three of these small canvases should be green, not red.</p>
-<canvas id="fill-no-quirk" width="20" height="20"></canvas>
-<canvas id="stroke-no-quirk" width="20" height="20"></canvas>
-<canvas id="clip-no-quirk" width="20" height="20"></canvas>
-<p>All three of these small canvases should be green, not red, too, but these test the Dashboard compatibility mode so they work properly only under DumpRenderTree.</p>
-<canvas id="fill-quirk" width="20" height="20"></canvas>
-<canvas id="stroke-quirk" width="20" height="20"></canvas>
-<canvas id="clip-quirk" width="20" height="20"></canvas>
+<canvas id="fill" width="20" height="20"></canvas>
+<canvas id="stroke" width="20" height="20"></canvas>
+<canvas id="clip" width="20" height="20"></canvas>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698