4 https://bugzilla.mozilla.org/show_bug.cgi?id=653741
7 <title>Test for Bug
653741</title>
8 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/WindowSnapshot.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=653741">Mozilla Bug
653741</a>
15 <script type=
"application/javascript;version=1.7">
17 /** Test for Bug
653741 **/
18 SimpleTest.waitForExplicitFinish();
20 function childLoad() {
21 // Spin the event loop so we leave the onload handler.
22 SimpleTest.executeSoon(childLoad2);
25 function childLoad2() {
26 let cw = $('iframe').contentWindow;
28 // Save the Y offset. For sanity's sake, make sure it's not
0, because we
29 // should be at the bottom of the page!
30 let origYOffset = cw.pageYOffset;
31 ok(origYOffset !=
0, 'Original Y offset is not
0.');
33 // Scroll the iframe to the top, then navigate to #bottom again.
36 // Our current location is #bottom, so this should scroll us down to the
38 cw.location = cw.location + '';
40 is(cw.pageYOffset, origYOffset, 'Correct offset after reloading page.');
46 <iframe height='
100px' id='iframe' src='file_bug653741.html#bottom'
></iframe>