blob: 7f4f3e35175bf7e5fee7cefe7aee413d44901825 [file] [log] [blame]
<html>
<meta http-equiv="refresh" content="2">
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpAsText();
}
function documentURLHash()
{
var index = document.URL.lastIndexOf("#");
if (index == -1)
return "";
return document.URL.substring(index);
}
function hashChanged()
{
document.body.innerHTML += "scrolled to hash " + documentURLHash();
window.scroll(0,100);
}
function testScroll() {
window.setTimeout(function() {
if (window.pageYOffset == 100) {
document.body.innerHTML = "SUCCESS";
testRunner.notifyDone();
} else
location.assign('scrollstate-after-http-equiv-refresh-fragment-identifier.html#1');
}, 0);
}
onload = testScroll;
onhashchange = hashChanged;
</script>
<body>
This test checks that a page reloaded by http-equiv="refresh" restores its scroll state even
when the user has loaded a fragment within the document.
https://bugs.webkit.org/show_bug.cgi?id=62482
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div id="1"></div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>