background-position-2a.html 616 B

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE html>
  2. <html lang="en" class="reftest-wait">
  3. <meta charset="utf-8">
  4. <title>Changes to background-position should invalidate properly.</title>
  5. <style>
  6. body {
  7. margin: 0;
  8. }
  9. #background {
  10. width: 100px;
  11. height: 100px;
  12. background-image: url(image_rgrg-256x256.png);
  13. background-repeat: no-repeat;
  14. background-position: 0 0;
  15. }
  16. </style>
  17. <div id="background"></div>
  18. <script>
  19. function doTest() {
  20. document.querySelector("#background").style.backgroundPosition = "-140px 0";
  21. document.documentElement.removeAttribute("class");
  22. }
  23. document.addEventListener("MozReftestInvalidate", doTest);
  24. </script>