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

Unified Diff: LayoutTests/fast/canvas/script-tests/canvas-ellipse-360-winding.js

Issue 14298022: Add support for new canvas ellipse method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make canvas-ellipse-360-winding.html for virtual/gpu pass. Created 7 years, 4 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-ellipse-360-winding.js
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-arc-360-winding.js b/LayoutTests/fast/canvas/script-tests/canvas-ellipse-360-winding.js
similarity index 64%
copy from LayoutTests/fast/canvas/script-tests/canvas-arc-360-winding.js
copy to LayoutTests/fast/canvas/script-tests/canvas-ellipse-360-winding.js
index 0ec7b823ab99d3fa10b181e82349164dc85bf64b..aefe3423c04298e7f1c7e3686bb2c20b6e3d3171 100644
--- a/LayoutTests/fast/canvas/script-tests/canvas-arc-360-winding.js
+++ b/LayoutTests/fast/canvas/script-tests/canvas-ellipse-360-winding.js
@@ -11,7 +11,7 @@ var anticlockwise = true;
ctx.beginPath();
for (r = 200; r >= 10; r -= 10) {
ctx.moveTo(150 + r, 75);
- ctx.arc(150, 75, r, 0, Math.PI*2, anticlockwise);
+ ctx.ellipse(150, 75, r, r * 1.2, 0, 0, Math.PI * 2, anticlockwise);
ctx.closePath();
anticlockwise = !anticlockwise;
}
@@ -22,18 +22,24 @@ ctx.stroke();
var imageData = ctx.getImageData(297, 75, 1, 1);
var data = imageData.data;
-shouldBe("data[0]", "0");
shouldBe("data[1]", "0");
-shouldBe("data[2]", "0");
-imageData = ctx.getImageData(285, 5, 1, 1);
+imageData = ctx.getImageData(295, 144, 1, 1);
data = imageData.data;
-shouldBe("data[0]", "0");
shouldBe("data[1]", "255");
-shouldBe("data[2]", "0");
-imageData = ctx.getImageData(277, 75, 1, 1);
+imageData = ctx.getImageData(272, 144, 1, 1);
+data = imageData.data;
+shouldBe("data[1]", "255");
+
+imageData = ctx.getImageData(262, 144, 1, 1);
data = imageData.data;
-shouldBe("data[0]", "0");
shouldBe("data[1]", "0");
-shouldBe("data[2]", "0");
+
+imageData = ctx.getImageData(239, 144, 1, 1);
+data = imageData.data;
+shouldBe("data[1]", "0");
+
+imageData = ctx.getImageData(228, 144, 1, 1);
+data = imageData.data;
+shouldBe("data[1]", "255");

Powered by Google App Engine
This is Rietveld 408576698