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

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

Issue 178673002: Rename Path to Path2D (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@path
Patch Set: Merge to head which includes isPoint and addPath changes. 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-currentPath.js
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-currentPath.js b/LayoutTests/fast/canvas/script-tests/canvas-currentPath.js
index cd5ed5486b9430f57e23134a3616803479ce5fdf..7a15ad8b71469a2cb7557ac82f754e9d3703cbe0 100644
--- a/LayoutTests/fast/canvas/script-tests/canvas-currentPath.js
+++ b/LayoutTests/fast/canvas/script-tests/canvas-currentPath.js
@@ -1,5 +1,7 @@
description("Test the behavior of currentPath in Canvas");
-var ctx = document.createElement('canvas').getContext('2d');
+var c = document.createElement('canvas');
+document.body.appendChild(c);
+var ctx = c.getContext('2d');
var testStrings = [
"ctx.isPointInPath(49,49)",
@@ -25,7 +27,7 @@ ctx.fillStyle = '#0f0';
ctx.beginPath();
debug("Create path object, replace current context path with the path of this object.");
-var p = new Path();
+var p = new Path2D();
p.rect(0,0,200,200);
testPointCollection([false, false, false, false, false]);
@@ -60,7 +62,7 @@ shouldBeNull("p");
ctx.beginPath();
ctx.rect(0,0,200,200);
p = ctx.currentPath;
-shouldBeType("p", "Path");
+shouldBeType("p", "Path2D");
debug("");
debug("Create context path and test that it exists.");

Powered by Google App Engine
This is Rietveld 408576698