6 testRunner
.waitUntilDone();
8 // The animation is already in a pending state, change it to another
9 // pending id (newId), then make the new id valid and check that
10 // the animation runs.
11 var rect
= document
.getElementById('rect');
12 var animate
= document
.getElementById('set');
13 animate
.setAttributeNS("http://www.w3.org/1999/xlink", "href", "#newId");
14 rect
.setAttribute('id', 'newId');
16 // Defer to allow animations to run.
17 setTimeout(function() {
18 if (window
.testRunner
)
19 testRunner
.notifyDone();
23 <body onload=
"runTest()">
24 <p id=
"description">Test that an animation with a pending resource can be changed to a second pending resource, then resolved correctly.
</p>
25 <svg id=
"svg" width=
"300" height=
"300">
26 <!-- This red square should be covered up if we pass. -->
27 <rect x=
"0" y=
"0" width=
"100" height=
"100" fill=
"red"/>
29 <!-- This green square should end up covering the red square if we pass. -->
30 <rect id=
"rect" x=
"-100" y=
"0" width=
"100" height=
"100" fill=
"green"/>
31 <set id=
"set" xlink:
href=
"#doesNotExist" attributeName=
"x" to=
"0" />