no bug - Bumping Firefox l10n changesets r=release a=l10n-bump DONTBUILD CLOSED TREE
[gecko.git] / docshell / test / mochitest / test_bug1186774.html
blob9ec56baf116e291d3e799d1f3d333548c7b8ceba
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=1186774
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 1186774</title>
9 <script src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="application/javascript">
13 /** Test for Bug 1186774 */
15 var child;
17 function runTest() {
18 child = window.open("file_bug1186774.html", "", "width=100,height=100");
19 child.onload = function() {
20 setTimeout(function() {
21 child.scrollTo(0, 0);
22 child.history.pushState({}, "initial");
23 child.scrollTo(0, 3000);
24 child.history.pushState({}, "scrolled");
25 child.scrollTo(0, 6000);
26 child.history.back();
27 });
30 child.onpopstate = function() {
31 is(Math.round(child.scrollY), 6000, "Shouldn't have scrolled before popstate");
32 child.close();
33 SimpleTest.finish();
37 SimpleTest.waitForExplicitFinish();
38 addLoadEvent(runTest);
40 </script>
41 </head>
42 <body>
43 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1186774">Mozilla Bug 1186774</a>
44 <p id="display"></p>
45 <div id="content" style="display: none">
47 </div>
48 <pre id="test">
49 </pre>
50 </body>
51 </html>