OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <svg></svg> | |
5 <script> | |
6 var t = async_test("No 'load' is fired on the SVG root when an image is inserted into it."); | |
7 | |
8 window.onload = function() { | |
9 var svgRoot = document.querySelector('svg'); | |
10 svgRoot.onload = t.unreached_func("'load' should not fire on the SVG root."); | |
11 | |
12 var image = document.createElementNS('http://www.w3.org/2000/svg', 'image'); | |
13 image.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', 'resources/ red-checker.png'); | |
14 image.setAttribute('width', 10); | |
15 image.setAttribute('height', 10); | |
16 image.onload = t.step_func(function() { | |
17 assert_true(true); | |
18 setTimeout(function() { t.done(); }, 0); | |
pdr.
2014/07/10 03:48:15
I don't think this setTimeout is needed, nor the a
fs
2014/07/10 08:32:50
The setTimeout is needed to provide a "window" for
| |
19 }); | |
20 svgRoot.appendChild(image); | |
21 } | |
22 </script> | |
OLD | NEW |