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

Unified Diff: LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt

Issue 179383002: Add versions of isPointIn*() that take a Path parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase again 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/canvas-isPointInStroke-with-path-expected.txt
diff --git a/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt b/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt
new file mode 100644
index 0000000000000000000000000000000000000000..089df2ac9526dfcebcf4b8ce0e5d45db0f82e352
--- /dev/null
+++ b/LayoutTests/fast/canvas/canvas-isPointInStroke-with-path-expected.txt
@@ -0,0 +1,77 @@
+Test the behavior of isPointInStroke in Canvas with path object
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Initial behavior: lineWidth = 1.0
+PASS ctx.isPointInStroke(path,20,20) is true
+PASS ctx.isPointInStroke(path,120,20) is true
+PASS ctx.isPointInStroke(path,20,120) is true
+PASS ctx.isPointInStroke(path,120,120) is true
+PASS ctx.isPointInStroke(path,70,20) is true
+PASS ctx.isPointInStroke(path,20,70) is true
+PASS ctx.isPointInStroke(path,120,70) is true
+PASS ctx.isPointInStroke(path,70,120) is true
+PASS ctx.isPointInStroke(path,22,22) is false
+PASS ctx.isPointInStroke(path,118,22) is false
+PASS ctx.isPointInStroke(path,22,118) is false
+PASS ctx.isPointInStroke(path,118,118) is false
+PASS ctx.isPointInStroke(path,70,18) is false
+PASS ctx.isPointInStroke(path,122,70) is false
+PASS ctx.isPointInStroke(path,70,122) is false
+PASS ctx.isPointInStroke(path,18,70) is false
+PASS ctx.isPointInStroke(path,NaN,122) is false
+PASS ctx.isPointInStroke(path,18,NaN) is false
+
+Check null and invalid type
+PASS ctx.isPointInStroke(null,70,20) threw exception TypeMismatchError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': The 1st argument provided is either null, or an invalid Path object..
+PASS ctx.isPointInStroke([],20,70) threw exception TypeError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': No function was found that matched the signature provided..
+PASS ctx.isPointInStroke({},120,70) threw exception TypeError: Failed to execute 'isPointInStroke' on 'CanvasRenderingContext2D': No function was found that matched the signature provided..
+
+Set lineWidth = 10.0
+PASS ctx.isPointInStroke(path,22,22) is true
+PASS ctx.isPointInStroke(path,118,22) is true
+PASS ctx.isPointInStroke(path,22,118) is true
+PASS ctx.isPointInStroke(path,118,118) is true
+PASS ctx.isPointInStroke(path,70,18) is true
+PASS ctx.isPointInStroke(path,122,70) is true
+PASS ctx.isPointInStroke(path,70,122) is true
+PASS ctx.isPointInStroke(path,18,70) is true
+PASS ctx.isPointInStroke(path,26,70) is false
+PASS ctx.isPointInStroke(path,70,26) is false
+PASS ctx.isPointInStroke(path,70,114) is false
+PASS ctx.isPointInStroke(path,114,70) is false
+
+Check lineJoin = 'bevel'
+PASS ctx.isPointInStroke(path,113,20) is false
+
+Check lineJoin = 'miter'
+PASS ctx.isPointInStroke(path,113,20) is true
+
+Check miterLimit = 2.0
+PASS ctx.isPointInStroke(path,113,20) is false
+
+Check lineCap = 'butt'
+PASS ctx.isPointInStroke(path,112,10) is false
+
+Check lineCap = 'round'
+PASS ctx.isPointInStroke(path,112,10) is true
+PASS ctx.isPointInStroke(path,117,10) is false
+
+Check lineCap = 'square'
+PASS ctx.isPointInStroke(path,112,10) is true
+PASS ctx.isPointInStroke(path,117,10) is false
+
+Check setLineDash([10,10])
+PASS ctx.isPointInStroke(path,15,10) is true
+PASS ctx.isPointInStroke(path,25,10) is false
+PASS ctx.isPointInStroke(path,35,10) is true
+
+Check dashOffset = 10
+PASS ctx.isPointInStroke(path,15,10) is false
+PASS ctx.isPointInStroke(path,25,10) is true
+PASS ctx.isPointInStroke(path,35,10) is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Powered by Google App Engine
This is Rietveld 408576698