cross-container-2.xhtml (1450B)
1 <?xml version="1.0" encoding="UTF-8" ?> 2 <html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> 3 <!-- 4 Check that pausing the base time container makes dependent times unresolved. 5 --> 6 <head> 7 <script><!----><![CDATA[ 8 function snapshot() { 9 var a = document.getElementById("svg-a"); 10 var b = document.getElementById("svg-b"); 11 a.pauseAnimations(); 12 b.pauseAnimations(); 13 a.setCurrentTime(2); // Since b is paused, the start time of a is now 14 // unresolved. 15 // Check DOM state as well 16 var wrong = document.getElementById("wrong"); 17 try { 18 document.getElementById("a").getStartTime(); 19 } catch (e) { 20 if (e.name == "InvalidStateError" && 21 e.code == DOMException.INVALID_STATE_ERR) { 22 wrong.style.setProperty('visibility', 'hidden', ''); 23 } 24 } 25 document.documentElement.removeAttribute("class"); 26 } 27 //]]></script> 28 </head> 29 <body onload="snapshot()"> 30 <svg xmlns="http://www.w3.org/2000/svg" width="120px" height="120px" id="svg-a"> 31 <rect width="100" height="100" fill="green"> 32 <set attributeName="fill" to="red" begin="b.begin" id="a"/> 33 </rect> 34 <g id="wrong"> 35 <line stroke="black" stroke-width="8" x1="0" y1="0" x2="100" y2="100"/> 36 <line stroke="black" stroke-width="8" x1="0" y1="100" x2="100" y2="0"/> 37 </g> 38 </svg> 39 <svg xmlns="http://www.w3.org/2000/svg" width="120px" height="120px" id="svg-b"> 40 <set attributeName="y" to="0" begin="1s" id="b"/> 41 </svg> 42 </body> 43 </html>