Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=564115
5 -->
6 <head>
7 <title>Test for Bug 564115</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <p><a target="_blank" href="https://bugzilla.mozilla.org/show_bug?id=564115">Mozilla Bug 564115</a>
15 <pre id="test">
16 <script>
18 const TEST_URL = "/tests/layout/forms/test/bug564115_window.html";
20 addLoadEvent(function() {
21 var win = open(TEST_URL, "", "width=600,height=600");
22 SimpleTest.waitForFocus(function() {
23 var doc = win.document;
24 var input = doc.querySelector("input");
26 // Focus the input box, and wait for the focus to actually happen
27 input.focus();
28 setTimeout(function() {
29 // Scroll down a bit
30 win.scrollTo(0, 5000);
32 setTimeout(function() {
33 is(win.pageYOffset, 5000, "Page should be scrolled correctly");
35 // Refocus the window
36 SimpleTest.waitForFocus(function() {
37 SimpleTest.waitForFocus(function() {
38 is(win.pageYOffset, 5000,
39 "The page's scroll offset should not have been changed");
41 win.close();
42 SimpleTest.finish();
43 }, win);
44 });
45 }, 0);
46 }, 0);
47 }, win);
48 });
50 SimpleTest.waitForExplicitFinish();
51 </script>
52 </pre>
54 </body>
55 </html>