dynamic-attr-change-2.svg 876 B

123456789101112131415161718192021222324252627
  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. <script>
  7. function doTest() {
  8. var target = document.querySelector(".target");
  9. target.setAttribute("transform", "translate(20,20)");
  10. document.documentElement.removeAttribute("class");
  11. }
  12. document.addEventListener("MozReftestInvalidate", doTest, false);
  13. </script>
  14. <!-- Lime background to match pass.svg -->
  15. <rect height="100%" width="100%" fill="lime"/>
  16. <!-- Red rect, which we'll have to cover up to pass the test: -->
  17. <rect x="20" y="20" width="100" height="100" fill="red"/>
  18. <!-- Lime rect, which we'll try to transform to cover up the red rect: -->
  19. <g class="target" transform="">
  20. <rect width="100" height="100" fill="lime"/>
  21. </g>
  22. </svg>