dom/smil/crashtests/650732-1.svg

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 <svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait">
michael@0 2 <rect fill="green" width="100" height="100">
michael@0 3 <set id="a" attributeName="fill" to="blue"
michael@0 4 begin="6s" end="986s"/>
michael@0 5 <set id="b" attributeName="fill" to="orange"
michael@0 6 begin="a.begin+69.3s;b.begin+700s" dur="700s" end="a.end"/>
michael@0 7 <set id="c" attributeName="fill" to="yellow"
michael@0 8 begin="0s;b.begin+700s"/>
michael@0 9 </rect>
michael@0 10 <script type="text/javascript">
michael@0 11 <![CDATA[
michael@0 12 const max_attempts = 100;
michael@0 13 var attempts = 0;
michael@0 14 function attemptCrash()
michael@0 15 {
michael@0 16 remove();
michael@0 17 add();
michael@0 18 if (++attempts >= max_attempts) {
michael@0 19 document.documentElement.removeAttribute("class");
michael@0 20 } else {
michael@0 21 setTimeout(attemptCrash, 0);
michael@0 22 }
michael@0 23 }
michael@0 24 function add()
michael@0 25 {
michael@0 26 const svgns = "http://www.w3.org/2000/svg";
michael@0 27 var elem = document.createElementNS(svgns, "set");
michael@0 28 elem.setAttribute("id", "b");
michael@0 29 elem.setAttribute("attributeName", "fill");
michael@0 30 elem.setAttribute("to", "orange");
michael@0 31 elem.setAttribute("begin", "a.begin+69.3s;b.begin+700s");
michael@0 32 elem.setAttribute("dur", "700s");
michael@0 33 elem.setAttribute("end", "a.end");
michael@0 34 rect = document.getElementsByTagNameNS(svgns, "rect")[0];
michael@0 35 rect.appendChild(elem);
michael@0 36 }
michael@0 37 function remove()
michael@0 38 {
michael@0 39 var elem = document.getElementById('b');
michael@0 40 elem.parentNode.removeChild(elem);
michael@0 41 elem = null;
michael@0 42 }
michael@0 43 window.addEventListener("load", attemptCrash, false);
michael@0 44 ]]>
michael@0 45 </script>
michael@0 46 </svg>

mercurial