layout/reftests/svg/dynamic-gradient-contents-01.svg

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/svg/dynamic-gradient-contents-01.svg	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,32 @@
     1.4 +<!--
     1.5 +     Any copyright is dedicated to the Public Domain.
     1.6 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.7 +-->
     1.8 +<svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="reftest-wait"
     1.9 +     xmlns:xlink="http://www.w3.org/1999/xlink"
    1.10 +     onload="startTest()">
    1.11 +  <title>Testing that dynamic changes to the element for a given ID are reflected in gradients</title>
    1.12 +  <style>
    1.13 +    .foo stop { stop-color:lime; }
    1.14 +  </style>
    1.15 +  <defs id="d">
    1.16 +    <linearGradient id="g" gradientUnits="objectBoundingBox" x2="0" y2="1">
    1.17 +      <stop stop-color="red" offset="0"/>
    1.18 +      <stop stop-color="red" offset="1"/>
    1.19 +    </linearGradient>
    1.20 +  </defs>
    1.21 + 
    1.22 +  <rect id="u1" width="100%" height="100%" fill="url(#g)"/>
    1.23 +
    1.24 +  <script>
    1.25 +  function startTest() {
    1.26 +    document.addEventListener("MozReftestInvalidate", doTest, false);
    1.27 +    setTimeout(doTest, 4000); // fallback for running outside reftest
    1.28 +  }
    1.29 +
    1.30 +  function doTest() {
    1.31 +    document.getElementById("g").setAttribute("class", "foo");
    1.32 +    document.documentElement.removeAttribute("class");
    1.33 +  }
    1.34 +  </script>
    1.35 +</svg>

mercurial