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

Side by Side Diff: LayoutTests/canvas/philip/tests/2d.imageData.create1.zero.html

Issue 237063003: Add StrictTypeChecking to CRC2D ImageData APIs (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase. Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageData-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Canvas test: 2d.imageData.create1.zero</title> 2 <title>Canvas test: 2d.imageData.create1.zero</title>
3 <script src="../tests.js"></script> 3 <script src="../tests.js"></script>
4 <link rel="stylesheet" href="../tests.css"> 4 <link rel="stylesheet" href="../tests.css">
5 <body> 5 <body>
6 <p id="passtext">Pass</p> 6 <p id="passtext">Pass</p>
7 <p id="failtext">Fail</p> 7 <p id="failtext">Fail</p>
8 <p class="output">These images should be identical:</p> 8 <p class="output">These images should be identical:</p>
9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL ( fallback content)</p></canvas> 9 <canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL ( fallback content)</p></canvas>
10 10
11 <ul id="d"></ul> 11 <ul id="d"></ul>
12 <script> 12 <script>
13 _addTest(function(canvas, ctx) { 13 _addTest(function(canvas, ctx) {
14 14
15 try { var _thrown = false; 15 try { var _thrown = false;
16 ctx.createImageData(null); 16 ctx.createImageData(null);
17 } catch (e) { if (e.code != DOMException.NOT_SUPPORTED_ERR) _fail("Failed assert ion: expected exception of type NOT_SUPPORTED_ERR, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type NOT_SUPPORTED _ERR: ctx.createImageData(null)"); } 17 } catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected e xception of type TypeError, got: "+e.message); _thrown = true; } finally { _asse rt(_thrown, "should throw exception of type TypeError: ctx.createImageData(null) "); }
18 18
19 19
20 }); 20 });
21 </script> 21 </script>
22 22
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/canvas/canvas-createImageData-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698