[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / loader / about-blank-hash-change.html
1 <p>This test tests parsing of hash fragments in about:blank URLs. Chromium had
2 a bug at one point where setting the hash fragment would cause a load event
3 and in some cases an infinite loop.</p>
4
5 <p>See <a href="https://bugs.webkit.org/show_bug.cgi?id=35180">
6 https://bugs.webkit.org/show_bug.cgi?id=35180</a>.</p>
7
8 <p>If the text says "PASS" then the onload() event only fired once. If it
9 says "FAIL" then it fired two or more times. Also, the test may time out
10 looping on this event handler (which is also a failure). If the text says "No callback" then something else is broken :)</p>
11 <script>
12 if (window.layoutTestController) {
13     layoutTestController.dumpAsText();
14 }
15
16 function onload_callback() {
17     var old_hash = inner.location.hash;
18     inner.location.hash = "hash-ref";
19     var c = document.getElementById("content");
20     if (c.innerHTML.match(/^No callback/)) {
21         c.innerHTML = "PASS";
22     } else if (c.innerHTML.match(/^PASS/)) {
23         c.innerHTML = "FAIL";
24     }
25 }
26 </script>
27 <div id="content">No callback</div>
28 <iframe name=inner id=inner style="display: none" onload="onload_callback()"
29 src="about:blank"></iframe>