Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / navigation / scrollstate-after-http-equiv-refresh-fragment-identifier.html
blob7f4f3e35175bf7e5fee7cefe7aee413d44901825
1 <html>
2 <meta http-equiv="refresh" content="2">
3 <script>
5 if (window.testRunner) {
6 testRunner.waitUntilDone();
7 testRunner.dumpAsText();
9 function documentURLHash()
11 var index = document.URL.lastIndexOf("#");
12 if (index == -1)
13 return "";
14 return document.URL.substring(index);
17 function hashChanged()
19 document.body.innerHTML += "scrolled to hash " + documentURLHash();
20 window.scroll(0,100);
23 function testScroll() {
24 window.setTimeout(function() {
25 if (window.pageYOffset == 100) {
26 document.body.innerHTML = "SUCCESS";
27 testRunner.notifyDone();
28 } else
29 location.assign('scrollstate-after-http-equiv-refresh-fragment-identifier.html#1');
30 }, 0);
33 onload = testScroll;
34 onhashchange = hashChanged;
36 </script>
38 <body>
39 This test checks that a page reloaded by http-equiv="refresh" restores its scroll state even
40 when the user has loaded a fragment within the document.
41 https://bugs.webkit.org/show_bug.cgi?id=62482
42 <br>
43 <br>
44 <br>
45 <br>
46 <br>
47 <br>
48 <br>
49 <br>
50 <br>
51 <br>
52 <br>
53 <br>
54 <br>
55 <br>
56 <br>
57 <br>
58 <div id="1"></div>
59 <br>
60 <br>
61 <br>
62 <br>
63 <br>
64 <br>
65 <br>
66 <br>
67 <br>
68 <br>
69 <br>
70 <br>
71 <br>
72 <br>
73 <br>
74 <br>
75 <br>
76 <br>
77 <br>
78 <br>
79 <br>
80 <br>
81 <br>
82 <br>
83 <br>
84 <br>
85 <br>
86 <br>
87 <br>
88 <br>
89 <br>
90 <br>
91 <br>
92 <br>
93 <br>
94 <br>
95 <br>
96 <br>
97 <br>
98 <br>
99 <br>
100 <br>
101 <br>
102 <br>
103 <br>
104 <br>
105 <br>
106 <br>
107 <br>
108 <br>
109 <br>
110 <br>
111 <br>
112 <br>
113 <br>
114 <br>
115 <br>
116 <br>
117 <br>
118 <br>
119 <br>
120 <br>
121 <br>
122 <br>
123 <br>
124 <br>
125 <br>
126 <br>
127 <br>
128 <br>
129 <br>
130 </body>
131 </html>