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

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     1 <!--
     2      Any copyright is dedicated to the Public Domain.
     3      http://creativecommons.org/publicdomain/zero/1.0/
     4 -->
     5 <svg xmlns="http://www.w3.org/2000/svg" version="1.1" class="reftest-wait"
     6      xmlns:xlink="http://www.w3.org/1999/xlink"
     7      onload="startTest()">
     8   <title>Testing that dynamic changes to the element for a given ID are reflected in gradients</title>
     9   <style>
    10     .foo stop { stop-color:lime; }
    11   </style>
    12   <defs id="d">
    13     <linearGradient id="g" gradientUnits="objectBoundingBox" x2="0" y2="1">
    14       <stop stop-color="red" offset="0"/>
    15       <stop stop-color="red" offset="1"/>
    16     </linearGradient>
    17   </defs>
    19   <rect id="u1" width="100%" height="100%" fill="url(#g)"/>
    21   <script>
    22   function startTest() {
    23     document.addEventListener("MozReftestInvalidate", doTest, false);
    24     setTimeout(doTest, 4000); // fallback for running outside reftest
    25   }
    27   function doTest() {
    28     document.getElementById("g").setAttribute("class", "foo");
    29     document.documentElement.removeAttribute("class");
    30   }
    31   </script>
    32 </svg>

mercurial