|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=842853 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 842853</title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 <script type="application/javascript"> |
|
12 |
|
13 /** Test for Bug 842853 **/ |
|
14 |
|
15 SimpleTest.waitForExplicitFinish(); |
|
16 |
|
17 function verifyAfterLoad() { |
|
18 var e = document.getElementsByTagName('iframe')[0]; |
|
19 var win = e.contentWindow; |
|
20 if (win.location.hash != '') { |
|
21 is(win.scrollY,500); |
|
22 SimpleTest.finish(); |
|
23 return; |
|
24 } |
|
25 } |
|
26 |
|
27 function runTest() { |
|
28 var e = document.getElementsByTagName('iframe')[0]; |
|
29 var win = e.contentWindow; |
|
30 if (win.location.hash != '') { |
|
31 return; |
|
32 } |
|
33 win.location.hash='#anchor' |
|
34 win.scrollTo(0,500); |
|
35 e.setAttribute("onload","verifyAfterLoad()"); |
|
36 win.location.reload() |
|
37 } |
|
38 |
|
39 |
|
40 </script> |
|
41 </head> |
|
42 <body> |
|
43 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=842853">Mozilla Bug 842853</a> |
|
44 <p id="display"></p> |
|
45 <div id="content" style="display: none"> |
|
46 </div> |
|
47 <pre id="test"> |
|
48 </pre> |
|
49 <iframe src="file_bug842853.html"></iframe> |
|
50 <script> |
|
51 |
|
52 </script> |
|
53 </body> |
|
54 </html> |