Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / touch / touch-handler-iframe-unload-assert.html
blobcb310efd641e0122e44608bc53da6a06395b3546
1 <!DOCTYPE HTML>
2 <script src="../../../resources/js-test.js"></script>
3 <p id="description"></p>
4 <div id="console"></div>
5 <script>
6 description("This test passes if it doesn't trigger an ASSERT - crbug.com/285299");
8 window.jsTestIsAsync = true;
10 function onDone()
12 finishJSTest();
15 var iframe = document.createElement('iframe');
17 // When the iframe and it's child frame finish loading, remove both. This should cleanup
18 // the parent frame first, and then trigger the unload event in the child domain - triggering
19 // the removal of it's final touch event handler.
20 function loaded()
22 // Make sure we don't get fired repeatedly.
23 iframe.removeEventListener('load', loaded);
24 iframe.src = 'about:blank';
25 window.setTimeout(onDone, 0);
27 iframe.addEventListener('load', loaded);
29 document.body.appendChild(iframe);
30 nestedDocument = iframe.contentWindow.document;
31 nestedDocument.open('text/html', 'replace');
32 nestedDocument.write('<!DOCTYPE html>\n<iframe src="resources/touch-handler-iframe-unload-assert-frame.html"></iframe>');
33 nestedDocument.close();
35 </script>