tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / dom / Window / slow-unload-handler-only-frame-is-stopped.html
1 <html>
2 <head>
3 <script>
4 if (layoutTestController) {
5     layoutTestController.waitUntilDone();
6     layoutTestController.dumpAsText();
7 }
8
9 function done()
10 {
11     if (document.getElementById("results").innerHTML == "")
12         document.getElementById("results").appendChild(document.createTextNode("PASS"));
13     if (layoutTestController)
14         layoutTestController.notifyDone();
15 }
16
17 function removeFrame()
18 {
19     var foo = document.getElementById('foo');
20     foo.parentNode.removeChild(foo);
21     done();
22 }
23 </script>
24 <body>
25 <p>
26     This is a test for <a href="https://bugs.webkit.org/show_bug.cgi?id=34226">bug 34226</a>:
27     <i>[v8]: Regression: onunload event handling</i>. If successful, PASS should be printed below.
28 </p>
29 <p id="results" class="pass"></p>
30 <iframe id='foo' src="data:text/html,<body onunload='handleUnload()'><script>function handleUnload() {var now=new Date();var exitTime=now.getTime()+5000;while(true){now=new Date();if(now.getTime()>exitTime)break}}</script></body>" onload="removeFrame()"></iframe>
31 </body>
32 </html>