test_bug388019.html (1057B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=388019 5 --> 6 <head> 7 <title>Test for Bug 388019</title> 8 <script src="/tests/SimpleTest/SimpleTest.js"></script> 9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 10 </head> 11 <body onload="run()"> 12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=388019">Mozilla Bug 388019</a> 13 <p id="display"></p> 14 <div id="content" style="display: none"> 15 16 </div> 17 <pre id="test"> 18 <script class="testbody" type="text/javascript"> 19 20 /** Test for Bug 388019 */ 21 22 SimpleTest.waitForExplicitFinish(); 23 24 function run() 25 { 26 var oldY = window.scrollY; 27 window.location.hash="#abc"; 28 var newY = window.scrollY; 29 isnot(oldY, newY, "we scroll at all"); 30 ok(oldY + 4000 < newY, "we scroll at least 4000 pixels"); 31 window.scrollTo(0, 0); // make the results visible 32 SimpleTest.finish(); 33 } 34 35 </script> 36 </pre> 37 38 <div style="height:4000px"></div> 39 <a name="abc"></a>You should see this text if you click on the link. 40 <div style="height:4000px"></div> 41 42 </body> 43 </html>