OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src=../../resources/run-after-display.js></script> |
| 3 <script> |
| 4 if (window.testRunner) |
| 5 testRunner.waitUntilDone(); |
| 6 |
| 7 function insertSVGImage() { |
| 8 var image = document.createElementNS('http://www.w3.org/2000/svg', 'image'); |
| 9 image.setAttribute('width', 192); |
| 10 image.setAttribute('height', 64); |
| 11 image.setAttributeNS('http://www.w3.org/1999/xlink', 'xlink:href', 'resource
s/rgb.svg'); |
| 12 image.onload = function() { |
| 13 runAfterDisplay(function() { |
| 14 if (window.testRunner) |
| 15 testRunner.notifyDone(); |
| 16 }); |
| 17 }; |
| 18 document.querySelector('g').appendChild(image); |
| 19 } |
| 20 |
| 21 function startTest() { |
| 22 if (window.testRunner) |
| 23 testRunner.displayAsyncThen(insertSVGImage); |
| 24 else |
| 25 requestAnimationFrame(insertSVGImage); |
| 26 } |
| 27 </script> |
| 28 <svg width="384" height="128" style="display: block"> |
| 29 <g transform="scale(2)"></g> |
| 30 </svg> |
| 31 <div> |
| 32 <img src="resources/rgb.svg" onload="startTest()" style="width: 384px; height:
128px;"> |
| 33 </div> |
OLD | NEW |