4 https://bugzilla.mozilla.org/show_bug.cgi?id=1269539
8 <title>Test for Bug
1269539</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <script src=
"/tests/SimpleTest/paint_listener.js"></script>
11 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
14 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=1269539">Mozilla Bug
1269539</a>
17 SimpleTest
.waitForExplicitFinish();
20 var childWin
= window
.open('file_scroll_position_restore.html', '_blank');
22 function handleLoad() {
25 childWin
.scrollTo(0, childWin
.scrollMaxY
);
26 childWin
.waitForAllPaintsFlushed(function() {
27 childWin
.location
.reload();
30 childWin
.waitForAllPaintsFlushed(function() {
31 // Verify that the scroll position was retained.
32 // NOTE: Window.scrollMaY is a long value, so we need to round
33 // Window.scrollY which is double.
34 // NOTE: Window.scrollMaxY is non-standard, so difference < 1.0 would not
36 is(Math
.round(childWin
.scrollY
), childWin
.scrollMaxY
);