background-position-2c.html (696B)
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 input type=button.</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 border-radius: 0; 21 padding: 0; 22 } 23 24 </style> 25 26 <input type="button" id="background"> 27 28 <script> 29 30 function doTest() { 31 document.querySelector("#background").style.backgroundPosition = "-140px 0"; 32 document.documentElement.removeAttribute("class"); 33 } 34 document.addEventListener("MozReftestInvalidate", doTest); 35 36 </script>