test_bug851445.html (901B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=851445 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 851445</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 </head> 12 <body> 13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=851445">Mozilla Bug 851445</a> 14 <p id="display"></p> 15 <iframe id="f" style="width:400px; height:400px;"></iframe> 16 <script> 17 SimpleTest.waitForExplicitFinish(); 18 19 function handleLoad() { 20 f.contentWindow.scrollTo(0,100); 21 function handleLoad2() { 22 // Verify that the scroll position was retained 23 is(f.contentWindow.scrollY, 100); 24 SimpleTest.finish(); 25 } 26 f.onload = handleLoad2; 27 f.contentWindow.location.reload(); 28 } 29 30 f.src = "bug851445_helper.html?" + Math.random(); 31 f.onload = handleLoad; 32 </script> 33 </body> 34 </html>