4 https://bugzilla.mozilla.org/show_bug.cgi?id=564115
7 <title>Test for Bug
564115</title>
8 <script type=
"text/javascript" src=
"/MochiKit/packed.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
14 <p><a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug?id=564115">Mozilla Bug
564115</a>
19 const TEST_URL
= "/tests/layout/forms/test/bug564115_window.html";
21 addLoadEvent(function() {
22 var win
= open(TEST_URL
, "", "width=600,height=600");
23 window
.childLoaded = function() {
24 var doc
= win
.document
;
25 var input
= doc
.querySelector("input");
27 // Focus the input box, and wait for the focus to actually happen
29 setTimeout(function() {
31 win
.scrollTo(0, 5000);
33 setTimeout(function() {
34 is(win
.pageYOffset
, 5000, "Page should be scrolled correctly");
37 SimpleTest
.waitForFocus(function() {
38 SimpleTest
.waitForFocus(function() {
39 is(win
.pageYOffset
, 5000,
40 "The page's scroll offset should not have been changed");
51 SimpleTest
.waitForExplicitFinish();