OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
fs
2017/03/15 14:22:16
Ditto.
hiroshige
2017/05/04 22:50:49
Done.
| |
2 <head> | |
3 <script src="../../resources/js-test.js"></script> | |
fs
2017/03/15 14:22:16
Ditto.
hiroshige
2017/05/04 22:50:50
Done.
| |
4 <script> | |
5 description("Test that loading of SVG that contains a font data URL completes be fore <img> and <body> onload handler is called, and thus doesn't cause assertion failure."); | |
6 jsTestIsAsync = true; | |
7 | |
8 var count = 0; | |
9 function doTest() { | |
10 var svg = document.getElementById('img'); | |
11 var canvas = document.createElement("canvas"); | |
12 var ctx = canvas.getContext("2d"); | |
13 ctx.drawImage(svg, 0, 0); | |
14 | |
15 // Test finishes when both <body> and <img>'s onload() are called. | |
16 ++count; | |
17 if (count == 2) { | |
18 finishJSTest(); | |
19 } | |
20 } | |
21 </script> | |
22 </head> | |
23 <body onload="debug('onload of body'); doTest()"> | |
24 <img src="resources/data-font-in-css-invalid-data-url.svg" id="img" onload="debu g('onload of img'); doTest()"> | |
25 </body> | |
26 </html> | |
OLD | NEW |