30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
<p>This test tests parsing of hash fragments in about:blank URLs. Chromium had
|
|
a bug at one point where setting the hash fragment would cause a load event
|
|
and in some cases an infinite loop.</p>
|
|
|
|
<p>See <a href="https://bugs.webkit.org/show_bug.cgi?id=35180">
|
|
https://bugs.webkit.org/show_bug.cgi?id=35180</a>.</p>
|
|
|
|
<p>If the text says "PASS" then the onload() event only fired once. If it
|
|
says "FAIL" then it fired two or more times. Also, the test may time out
|
|
looping on this event handler (which is also a failure). If the text says "No callback" then something else is broken :)</p>
|
|
<script>
|
|
if (window.testRunner) {
|
|
testRunner.dumpAsText();
|
|
}
|
|
|
|
function onload_callback() {
|
|
var old_hash = inner.location.hash;
|
|
inner.location.hash = "hash-ref";
|
|
var c = document.getElementById("content");
|
|
if (c.innerHTML.match(/^No callback/)) {
|
|
c.innerHTML = "PASS";
|
|
} else if (c.innerHTML.match(/^PASS/)) {
|
|
c.innerHTML = "FAIL";
|
|
}
|
|
}
|
|
</script>
|
|
<div id="content">No callback</div>
|
|
<iframe name=inner id=inner style="display: none" onload="onload_callback()"
|
|
src="about:blank"></iframe>
|