1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/svg/dynamic-gradient-contents-02.svg Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,35 @@ 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 parent element are reflected in gradients</title> 1.12 + <defs id="d"> 1.13 + <linearGradient id="g1" gradientUnits="objectBoundingBox" x2="0" y2="1"> 1.14 + <stop stop-color="red" offset="0"/> 1.15 + <stop stop-color="red" offset="1"/> 1.16 + </linearGradient> 1.17 + <linearGradient id="g2" gradientUnits="objectBoundingBox" x2="0" y2="1"> 1.18 + <stop stop-color="lime" offset="0"/> 1.19 + <stop stop-color="lime" offset="1"/> 1.20 + </linearGradient> 1.21 + </defs> 1.22 + 1.23 + <g id="g" fill="url(#g1)"> 1.24 + <rect id="u1" width="100%" height="100%" /> 1.25 + </g> 1.26 + 1.27 + <script> 1.28 + function startTest() { 1.29 + document.addEventListener("MozReftestInvalidate", doTest, false); 1.30 + setTimeout(doTest, 4000); // fallback for running outside reftest 1.31 + } 1.32 + 1.33 + function doTest() { 1.34 + document.getElementById("g").setAttribute("fill", "url(#g2)"); 1.35 + document.documentElement.removeAttribute("class"); 1.36 + } 1.37 + </script> 1.38 +</svg>