layout/reftests/svg/dynamic-clipPath-02.svg

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/svg/dynamic-clipPath-02.svg	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,36 @@
     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"
     1.9 +     class="reftest-wait"
    1.10 +     onload="startTest()"
    1.11 +     xmlns:xlink="http://www.w3.org/1999/xlink">
    1.12 +  <title>Testing that dynamic changes to the clipPathUnits are reflected in the clipPath</title>
    1.13 +
    1.14 +  <defs>
    1.15 +    <clipPath id="clip1" clipPathUnits="objectBoundingBox">
    1.16 +      <rect width=".1" height=".1"/>
    1.17 +    </clipPath>
    1.18 +  </defs>
    1.19 +
    1.20 +  <rect width="100%" height="100%" fill="lime"/>
    1.21 +
    1.22 +  <g transform="scale(1000)">
    1.23 +    <rect x=".2" y=".2" width=".6" height=".6" fill="red" clip-path="url(#clip1)"/>
    1.24 +  </g>
    1.25 +
    1.26 +  <script>
    1.27 +    function startTest() {
    1.28 +      document.addEventListener("MozReftestInvalidate", doTest, false);
    1.29 +      setTimeout(doTest, 4000); // fallback for running outside reftest
    1.30 +    }
    1.31 +
    1.32 +    function doTest() {
    1.33 +      var clip1 = document.getElementById("clip1");
    1.34 +      clip1.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
    1.35 +
    1.36 +      document.documentElement.removeAttribute("class");
    1.37 +    }
    1.38 +  </script>
    1.39 +</svg>

mercurial