Wed, 31 Dec 2014 13:27:57 +0100
Ignore runtime configuration files generated during quality assurance.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=653741 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 653741</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <script type="text/javascript" src="/tests/SimpleTest/WindowSnapshot.js"></script> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 11 | </head> |
michael@0 | 12 | <body> |
michael@0 | 13 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=653741">Mozilla Bug 653741</a> |
michael@0 | 14 | |
michael@0 | 15 | <script type="application/javascript;version=1.7"> |
michael@0 | 16 | |
michael@0 | 17 | /** Test for Bug 653741 **/ |
michael@0 | 18 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 19 | |
michael@0 | 20 | function childLoad() { |
michael@0 | 21 | // Spin the event loop so we leave the onload handler. |
michael@0 | 22 | SimpleTest.executeSoon(childLoad2); |
michael@0 | 23 | } |
michael@0 | 24 | |
michael@0 | 25 | function childLoad2() { |
michael@0 | 26 | let cw = $('iframe').contentWindow; |
michael@0 | 27 | |
michael@0 | 28 | // Save the Y offset. For sanity's sake, make sure it's not 0, because we |
michael@0 | 29 | // should be at the bottom of the page! |
michael@0 | 30 | let origYOffset = cw.pageYOffset; |
michael@0 | 31 | ok(origYOffset != 0, 'Original Y offset is not 0.'); |
michael@0 | 32 | |
michael@0 | 33 | // Scroll the iframe to the top, then navigate to #bottom again. |
michael@0 | 34 | cw.scrollTo(0, 0); |
michael@0 | 35 | |
michael@0 | 36 | // Our current location is #bottom, so this should scroll us down to the |
michael@0 | 37 | // bottom again. |
michael@0 | 38 | cw.location = cw.location + ''; |
michael@0 | 39 | |
michael@0 | 40 | is(cw.pageYOffset, origYOffset, 'Correct offset after reloading page.'); |
michael@0 | 41 | SimpleTest.finish(); |
michael@0 | 42 | } |
michael@0 | 43 | |
michael@0 | 44 | </script> |
michael@0 | 45 | |
michael@0 | 46 | <iframe height='100px' id='iframe' src='file_bug653741.html#bottom'></iframe> |
michael@0 | 47 | |
michael@0 | 48 | </body> |
michael@0 | 49 | </html> |