layout/reftests/svg/suspend-02.svg

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

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=734079 -->
    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       svg.suspendRedraw(10000);
    19       document.getElementById("r").setAttribute("fill", "lime");
    20       setTimeout(function() {
    21         svg.removeAttribute("class");
    22       }, 50);
    23     }
    24     ]]>
    25   </script>
    26   <rect id="r" width="100%" height="100%" fill="red"/>
    27 </svg>

mercurial