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=662170 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 662170</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=662170">Mozilla Bug 662170</a> |
michael@0 | 14 | |
michael@0 | 15 | <script type="application/javascript;version=1.7"> |
michael@0 | 16 | |
michael@0 | 17 | /** Test for Bug 662170 **/ |
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 | // When we initially load the page, we should be at the top. |
michael@0 | 29 | is(cw.pageYOffset, 0, 'Initial Y offset should be 0.'); |
michael@0 | 30 | |
michael@0 | 31 | // Scroll the iframe to the bottom. |
michael@0 | 32 | cw.scrollTo(0, 300); |
michael@0 | 33 | |
michael@0 | 34 | // Did we actually scroll somewhere? |
michael@0 | 35 | isnot(cw.pageYOffset, 0, 'Y offset should be non-zero after scrolling.'); |
michael@0 | 36 | |
michael@0 | 37 | // Now load file_bug662170.html#, which should take us to the top of the |
michael@0 | 38 | // page. |
michael@0 | 39 | cw.location = cw.location + '#'; |
michael@0 | 40 | |
michael@0 | 41 | is(cw.pageYOffset, 0, 'Correct Y offset after loading #.'); |
michael@0 | 42 | SimpleTest.finish(); |
michael@0 | 43 | } |
michael@0 | 44 | |
michael@0 | 45 | </script> |
michael@0 | 46 | |
michael@0 | 47 | <!-- When the iframe loads, it calls childLoad(). --> |
michael@0 | 48 | <iframe height='100px' id='iframe' src='file_bug662170.html'></iframe> |
michael@0 | 49 | |
michael@0 | 50 | </body> |
michael@0 | 51 | </html> |