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

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

Issue 289283002: Add some layout tests about behavior on undefined and null. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 7 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-isPointInPath-winding.js
diff --git a/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js b/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js
index 7ed85ecfe0782537222c13252e003101b5a02539..20c8a01186262f320a832f1b750afd472c1aad6b 100644
--- a/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js
+++ b/LayoutTests/fast/canvas/script-tests/canvas-isPointInPath-winding.js
@@ -61,17 +61,17 @@ function prepareTestScenario() {
shouldThrow("ctx.isPointInPath(50, 50, 'gazonk')");
debug('');
- debug('Testing null isPointInPath with Path object');
- path = null;
+ debug('Testing invalid type isPointInPath with Path object');
shouldThrow("ctx.isPointInPath(null, 50, 50)");
shouldThrow("ctx.isPointInPath(null, 50, 50, 'nonzero')");
shouldThrow("ctx.isPointInPath(null, 50, 50, 'evenodd')");
- shouldThrow("ctx.isPointInPath(path, 50, 50)");
- shouldThrow("ctx.isPointInPath(path, 50, 50, 'nonzero')");
- shouldThrow("ctx.isPointInPath(path, 50, 50, 'evenodd')");
- debug('');
-
- debug('Testing invalid type isPointInPath with Path object');
+ shouldThrow("ctx.isPointInPath(null, 50, 50, null)");
+ shouldThrow("ctx.isPointInPath(path, 50, 50, null)");
+ shouldThrow("ctx.isPointInPath(undefined, 50, 50)");
+ shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'nonzero')");
+ shouldThrow("ctx.isPointInPath(undefined, 50, 50, 'evenodd')");
+ shouldThrow("ctx.isPointInPath(undefined, 50, 50, undefined)");
+ shouldThrow("ctx.isPointInPath(path, 50, 50, undefined)");
shouldThrow("ctx.isPointInPath([], 50, 50)");
shouldThrow("ctx.isPointInPath([], 50, 50, 'nonzero')");
shouldThrow("ctx.isPointInPath([], 50, 50, 'evenodd')");

Powered by Google App Engine
This is Rietveld 408576698