layout/reftests/svg/dynamic-marker-01.svg

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/svg/dynamic-marker-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" onload="startTest()" xmlns:xlink="http://www.w3.org/1999/xlink">
     1.9 +  <title>Testing that dynamic changes to the element for a given ID are reflected in marker</title>
    1.10 +  <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=309220 -->
    1.11 +  <defs>
    1.12 +    <marker id="x" style="overflow: visible;" orient="auto" markerUnits="strokeWidth">
    1.13 +      <rect width="100%" height="100%" fill="lime"/>
    1.14 +    </marker>
    1.15 +  </defs>
    1.16 +	
    1.17 +  <rect width="100%" height="100%" fill="red"/>
    1.18 +	
    1.19 +  <line id="l1" x1="0" x2="0" y1="0" y2="0" fill="none" stroke="black" stroke-width="1" marker-end="url(#m1)"/>
    1.20 +
    1.21 +  <script>
    1.22 +  function startTest() {
    1.23 +    document.addEventListener("MozReftestInvalidate", doTest, false);
    1.24 +    setTimeout(doTest, 4000); // fallback for running outside reftest
    1.25 +  }
    1.26 +  
    1.27 +  function doTest() {
    1.28 +    // check that changing an id to "m1" lets l1 find it
    1.29 +    var x = document.getElementById("x");
    1.30 +    x.setAttribute("id", "m1");
    1.31 +
    1.32 +    document.documentElement.removeAttribute('class');
    1.33 +  }
    1.34 +  </script>
    1.35 +</svg>

mercurial