background-position-2e.html (777B)
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 cells.</title> 5 6 <style> 7 8 body { 9 margin: 0; 10 } 11 12 #background { 13 width: 100px; 14 height: 100px; 15 background-image: url(image_rgrg-256x256.png); 16 background-repeat: no-repeat; 17 background-position: 0 0; 18 19 border: 0; 20 padding: 0; 21 } 22 23 table, tr, td { 24 width: 100px; 25 height: 100px; 26 border: 0; 27 padding: 0; 28 border-spacing: 0; 29 } 30 31 </style> 32 33 <table><tr><td id="background"></td></table> 34 35 <script> 36 37 function doTest() { 38 document.querySelector("#background").style.backgroundPosition = "-140px 0"; 39 document.documentElement.removeAttribute("class"); 40 } 41 document.addEventListener("MozReftestInvalidate", doTest); 42 43 </script>