Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / svg / custom / svg-pending-twice.html
blob72d6f63f954001b3384ae8886b16a0f0ca4318a9
1 <!DOCTYPE HTML>
2 <html>
3 <script>
4 function runTest() {
5 if (window.testRunner)
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();
20 }, 0);
22 </script>
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" />
32 </svg>
33 </body>
34 </html>