Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
1 <?xml version="1.0"?>
2 <!--
3 Any copyright is dedicated to the Public Domain.
4 http://creativecommons.org/licenses/publicdomain/
5 -->
6 <svg xmlns="http://www.w3.org/2000/svg" class="reftest-wait">
7 <title>Test that suspendRedraw doesn't apply after the end of a script</title>
8 <!-- https://bugzilla.mozilla.org/show_bug.cgi?id=615146 -->
10 <script type="text/javascript">
11 <![CDATA[
13 document.addEventListener("MozReftestInvalidate", doTest, false);
14 setTimeout(doTest, 4000); // fallback for running outside reftest
16 function doTest() {
17 var svg = document.documentElement;
18 setTimeout(function() {
19 svg.suspendRedraw(10000);
20 var r = document.createElementNS("http://www.w3.org/2000/svg", "rect");
21 r.setAttribute("width", "100%");
22 r.setAttribute("height", "100%");
23 r.setAttribute("fill", "lime");
24 svg.appendChild(r);
25 svg.removeAttribute("class");
26 }, 50);
27 }
28 ]]>
29 </script>
30 <rect width="100%" height="100%" fill="red"/>
31 </svg>