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

Unified Diff: LayoutTests/fast/canvas/script-tests/canvas-path-addpath.js

Issue 226953004: Remove get/set currentPath in canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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-path-addpath.js
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-path-addpath.js b/LayoutTests/fast/canvas/script-tests/canvas-path-addpath.js
index fa583c2b746325791ba9a2378820c4ac2321de5a..4e8b5dbfb21c64da3daceff14a5b4dd9bc465423 100644
--- a/LayoutTests/fast/canvas/script-tests/canvas-path-addpath.js
+++ b/LayoutTests/fast/canvas/script-tests/canvas-path-addpath.js
@@ -12,8 +12,7 @@ p2.rect(0,100,100,100);
var m = ctx.currentTransform;
p1.addPath(p2, m);
ctx.fillStyle = 'yellow';
-ctx.currentPath = p1;
-ctx.fill();
+ctx.fill(p1);
var imageData = ctx.getImageData(0, 100, 100, 100);
var imgdata = imageData.data;
shouldBe("imgdata[4]", "255");
@@ -34,8 +33,7 @@ m.c = 0; m.d = 1;
m.e = 100; m.f = -100;
p3.addPath(p4, m);
ctx.fillStyle = 'yellow';
-ctx.currentPath = p3;
-ctx.fill();
+ctx.fill(p3);
imageData = ctx.getImageData(100, 0, 100, 100);
imgdata = imageData.data;
shouldBe("imgdata[4]", "255");
@@ -56,8 +54,7 @@ m.c = 0; m.d = 0;
m.e = 0; m.f = 0;
p5.addPath(p6, m);
ctx.fillStyle = 'yellow';
-ctx.currentPath = p5;
-ctx.fill();
+ctx.fill(p5);
imageData = ctx.getImageData(100, 100, 100, 100);
imgdata = imageData.data;
shouldNotBe("imgdata[4]", "255");
@@ -77,8 +74,7 @@ p7.addPath(p8, null);
shouldThrow("p7.addPath(p8, [])");
shouldThrow("p7.addPath(p8, {})");
ctx.fillStyle = 'red';
-ctx.currentPath = p7;
-ctx.fill();
+ctx.fill(p7);
imageData = ctx.getImageData(100, 100, 100, 100);
imgdata = imageData.data;
shouldBe("imgdata[4]", "255");
@@ -95,8 +91,7 @@ var p10 = new Path2D();
p9.rect(0,0,10,10);
p10.addPath(p9);
ctx.fillStyle = 'red';
-ctx.currentPath = p10;
-ctx.fill();
+ctx.fill(p10);
imageData = ctx.getImageData(1, 1, 1, 1);
imgdata = imageData.data;
shouldBe("imgdata[0]", "255");

Powered by Google App Engine
This is Rietveld 408576698