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

Side by Side Diff: LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js

Issue 337343002: IDL: make optional arguments (without default) explicit sometimes Base URL: https://chromium.googlesource.com/chromium/blink.git@idl-default-arguments-next
Patch Set: Created 6 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 unified diff | Download patch
OLDNEW
1 description("Series of tests to ensure correct results of the winding rule in is PointInPath."); 1 description("Series of tests to ensure correct results of the winding rule in is PointInPath.");
2 2
3 var tmpimg = document.createElement('canvas'); 3 var tmpimg = document.createElement('canvas');
4 tmpimg.width = 200; 4 tmpimg.width = 200;
5 tmpimg.height = 200; 5 tmpimg.height = 200;
6 ctx = tmpimg.getContext('2d'); 6 ctx = tmpimg.getContext('2d');
7 7
8 // Execute test. 8 // Execute test.
9 function prepareTestScenario() { 9 function prepareTestScenario() {
10 debug('Testing default isPointInPath'); 10 debug('Testing default isPointInPath');
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 debug('Testing invalid type isPointInPath with Path object'); 64 debug('Testing invalid type isPointInPath with Path object');
65 shouldThrow("ctx.isPointInPath(null, 50, 50)"); 65 shouldThrow("ctx.isPointInPath(null, 50, 50)");
66 shouldThrow("ctx.isPointInPath(null, 50, 50, 'nonzero')"); 66 shouldThrow("ctx.isPointInPath(null, 50, 50, 'nonzero')");
67 shouldThrow("ctx.isPointInPath(null, 50, 50, 'evenodd')"); 67 shouldThrow("ctx.isPointInPath(null, 50, 50, 'evenodd')");
68 shouldThrow("ctx.isPointInPath(null, 50, 50, null)"); 68 shouldThrow("ctx.isPointInPath(null, 50, 50, null)");
69 shouldThrow("ctx.isPointInPath(path, 50, 50, null)"); 69 shouldThrow("ctx.isPointInPath(path, 50, 50, null)");
70 shouldThrow("ctx.isPointInPath(undefined, 50, 50)"); 70 shouldThrow("ctx.isPointInPath(undefined, 50, 50)");
71 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'nonzero')"); 71 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'nonzero')");
72 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'evenodd')"); 72 shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'evenodd')");
73 shouldThrow("ctx.isPointInPath(undefined, 50, 50, undefined)"); 73 shouldThrow("ctx.isPointInPath(undefined, 50, 50, undefined)");
74 shouldThrow("ctx.isPointInPath(path, 50, 50, undefined)");
75 shouldThrow("ctx.isPointInPath([], 50, 50)"); 74 shouldThrow("ctx.isPointInPath([], 50, 50)");
76 shouldThrow("ctx.isPointInPath([], 50, 50, 'nonzero')"); 75 shouldThrow("ctx.isPointInPath([], 50, 50, 'nonzero')");
77 shouldThrow("ctx.isPointInPath([], 50, 50, 'evenodd')"); 76 shouldThrow("ctx.isPointInPath([], 50, 50, 'evenodd')");
78 shouldThrow("ctx.isPointInPath({}, 50, 50)"); 77 shouldThrow("ctx.isPointInPath({}, 50, 50)");
79 shouldThrow("ctx.isPointInPath({}, 50, 50, 'nonzero')"); 78 shouldThrow("ctx.isPointInPath({}, 50, 50, 'nonzero')");
80 shouldThrow("ctx.isPointInPath({}, 50, 50, 'evenodd')"); 79 shouldThrow("ctx.isPointInPath({}, 50, 50, 'evenodd')");
81 debug(''); 80 debug('');
82 } 81 }
83 82
84 // Run test and allow variation of results. 83 // Run test and allow variation of results.
85 prepareTestScenario(); 84 prepareTestScenario();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698