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

Unified Diff: third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-exception-test.html

Issue 1575813002: css Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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: third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-exception-test.html
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-exception-test.html b/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-exception-test.html
new file mode 100644
index 0000000000000000000000000000000000000000..150bb52d26cc8f1898f670495b0d56caab243ab8
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-exception-test.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>HitRegion Exception Test</title>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="./resources/test-helpers.js"></script>
+<canvas width="400" height="400"></canvas>
+<script>
+
+var canvas = document.querySelector('canvas');
+var context = canvas.getContext('2d');
+
+generate_tests(assert_throws, [
+ [ 'context.addHitRegion()', { name : 'NotSupportedError' }, function() { context.addHitRegion(); } ],
+ [ 'context.addHitRegion({ id : \'\' })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : '' }); } ],
+ [ 'context.addHitRegion({ id : undefined })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : undefined }); } ],
+ [ 'context.addHitRegion({ control : {} })', { name : 'TypeError' }, function() { context.addHitRegion({ control : {} }); } ],
+ [ 'context.addHitRegion({ control : null })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ control : null }); } ],
+ [ 'context.addHitRegion({ control : undefined })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ control : undefined }); } ],
+ [ 'context.addHitRegion({ id : \'\', control : {} })', { name : 'TypeError' }, function() { context.addHitRegion({ id : '', control : {} }); } ],
+ [ 'context.addHitRegion({ id : undefined, control : {} })', { name : 'TypeError' }, function() { context.addHitRegion({ id : undefined, control : {} }); } ],
+ [ 'context.addHitRegion({ id : \'\', control : null })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : '', control : null }); } ],
+ [ 'context.addHitRegion({ id : undefined, control : null })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : undefined, control : null }); } ],
+ [ 'context.addHitRegion({ id : \'\', control : undefined })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : '', control : undefined }); } ],
+ [ 'context.addHitRegion({ id : undefined, control : undefined )', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : undefined, control : undefined }); } ],
+]);
+
+</script>

Powered by Google App Engine
This is Rietveld 408576698