Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / canvas / philip / tests / 2d.imageData.create1.zero.html
1 <!DOCTYPE html>
2 <title>Canvas test: 2d.imageData.create1.zero</title>
3 <script src="../tests.js"></script>
4 <link rel="stylesheet" href="../tests.css">
5 <body>
6 <p id="passtext">Pass</p>
7 <p id="failtext">Fail</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>
10
11 <ul id="d"></ul>
12 <script>
13 _addTest(function(canvas, ctx) {
14
15 try { var _thrown = false;
16   ctx.createImageData(null);
17 } catch (e) { if (!(e instanceof TypeError)) _fail("Failed assertion: expected exception of type TypeError, got: "+e.message); _thrown = true; } finally { _assert(_thrown, "should throw exception of type TypeError: ctx.createImageData(null)"); }
18
19
20 });
21 </script>
22