gecko-dev/docshell/test/navigation/file_fragment_handling_during_load.html
Olli Pettay 1ac99b3b45 Bug 895557, follow the spec when doing fragment navigation during page loads, enable test
--HG--
extra : rebase_source : ed08041d6ff4b53da32d6a7a73fcc9ad7b5e8958
2014-03-01 21:08:18 +02:00

25 lines
751 B
HTML

<html>
<head>
<script>
var timerID = 0;
function testDone() {
clearTimeout(timerID);
var l = document.body.firstChild.contentWindow.location.href;
opener.is(l, "data:text/html,bar", "Should have loaded a new document");
opener.nextTest();
window.close();
}
function test() {
var ifr = document.getElementsByTagName("iframe")[0];
ifr.onload = testDone;
ifr.contentWindow.location.hash = "b";
ifr.contentWindow.location.href = "data:text/html,bar";
history.back();
timerID = setTimeout(testDone, 2000);
}
</script>
</head>
<body onload="setTimeout(test, 0)"><iframe src="data:text/html,foo#a"></iframe>
</body>
</html>