Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / canvas / test / test_2d.drawImage.broken.html
blobd187db07971f85a3c2e9b5fcf0140bf3cf8bf759
1 <!DOCTYPE HTML>
2 <title>Canvas test: 2d.drawImage.broken</title>
3 <script src="/MochiKit/MochiKit.js"></script>
4 <script src="/tests/SimpleTest/SimpleTest.js"></script>
5 <link rel="stylesheet" href="/tests/SimpleTest/test.css">
6 <body>
7 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
8 <script>
10 SimpleTest.waitForExplicitFinish();
11 MochiKit.DOM.addLoadEvent(function () {
13 var canvas = document.getElementById('c');
14 var ctx = canvas.getContext('2d');
16 var img = document.getElementById('broken.png');
17 todo(img.complete === false, "img.complete === false");
18 var _thrown = undefined; try {
19 ctx.drawImage(img, 0, 0);
20 } catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.INVALID_STATE_ERR, "should throw INVALID_STATE_ERR");
22 SimpleTest.finish();
24 });
25 </script>
26 <img src="image_broken.png" id="broken.png" class="resource">