<html class="reftest-wait"> <head> </head> <body> <div id="container" style="height: 100px; overflow: hidden;"> <div id="second" style="background-color:red; width: 10px; height: 10px;"></div> <div id="spacer" style="height: 200px;"></div> </div> </body> <script> function doTest() { document.getElementById("container").scrollTop = 100; document.documentElement.removeAttribute("class"); } window.addEventListener("MozReftestInvalidate", doTest); </script> </html>