background-position-2d.html 776 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <!DOCTYPE html>
  2. <html lang="en" class="reftest-wait">
  3. <meta charset="utf-8">
  4. <title>Changes to background-position should invalidate properly for table rows.</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. border: 0;
  16. padding: 0;
  17. }
  18. table, tr, td {
  19. width: 100px;
  20. height: 100px;
  21. border: 0;
  22. padding: 0;
  23. border-spacing: 0;
  24. }
  25. </style>
  26. <table><tr id="background"><td></td></table>
  27. <script>
  28. function doTest() {
  29. document.querySelector("#background").style.backgroundPosition = "-140px 0";
  30. document.documentElement.removeAttribute("class");
  31. }
  32. document.addEventListener("MozReftestInvalidate", doTest);
  33. </script>