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

Side by Side 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>HitRegion Exception Test</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="./resources/test-helpers.js"></script>
6 <canvas width="400" height="400"></canvas>
7 <script>
8
9 var canvas = document.querySelector('canvas');
10 var context = canvas.getContext('2d');
11
12 generate_tests(assert_throws, [
13 [ 'context.addHitRegion()', { name : 'NotSupportedError' }, function() { conte xt.addHitRegion(); } ],
14 [ 'context.addHitRegion({ id : \'\' })', { name : 'NotSupportedError' }, funct ion() { context.addHitRegion({ id : '' }); } ],
15 [ 'context.addHitRegion({ id : undefined })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ id : undefined }); } ],
16 [ 'context.addHitRegion({ control : {} })', { name : 'TypeError' }, function() { context.addHitRegion({ control : {} }); } ],
17 [ 'context.addHitRegion({ control : null })', { name : 'NotSupportedError' }, function() { context.addHitRegion({ control : null }); } ],
18 [ 'context.addHitRegion({ control : undefined })', { name : 'NotSupportedError ' }, function() { context.addHitRegion({ control : undefined }); } ],
19 [ 'context.addHitRegion({ id : \'\', control : {} })', { name : 'TypeError' }, function() { context.addHitRegion({ id : '', control : {} }); } ],
20 [ 'context.addHitRegion({ id : undefined, control : {} })', { name : 'TypeErro r' }, function() { context.addHitRegion({ id : undefined, control : {} }); } ],
21 [ 'context.addHitRegion({ id : \'\', control : null })', { name : 'NotSupporte dError' }, function() { context.addHitRegion({ id : '', control : null }); } ],
22 [ 'context.addHitRegion({ id : undefined, control : null })', { name : 'NotSup portedError' }, function() { context.addHitRegion({ id : undefined, control : nu ll }); } ],
23 [ 'context.addHitRegion({ id : \'\', control : undefined })', { name : 'NotSup portedError' }, function() { context.addHitRegion({ id : '', control : undefined }); } ],
24 [ 'context.addHitRegion({ id : undefined, control : undefined )', { name : 'No tSupportedError' }, function() { context.addHitRegion({ id : undefined, control : undefined }); } ],
25 ]);
26
27 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698