2 <script src=../../resources/run-after-layout-and-paint.js
></script>
5 testRunner
.waitUntilDone();
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', 'resources/rgb.svg');
12 image
.onload = function() {
13 runAfterLayoutAndPaint(function() {
14 if (window
.testRunner
)
15 testRunner
.notifyDone();
18 document
.querySelector('g').appendChild(image
);
21 function startTest() {
22 if (window
.testRunner
)
23 testRunner
.layoutAndPaintAsyncThen(insertSVGImage
);
25 requestAnimationFrame(insertSVGImage
);
28 <svg width=
"384" height=
"128" style=
"display: block">
29 <g transform=
"scale(2)"></g>
32 <img src=
"resources/rgb.svg" onload=
"startTest()" style=
"width: 384px; height: 128px;">