Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / before-unload-in-subframe.html
blobf922da78cca21977cc71ddf096586c1671fc4082
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>This tests beforeunload event in subframes. You should see PASS below:</p>
5 <pre id="log"></pre>
6 <script>
8 if (window.testRunner) {
9 testRunner.dumpAsText();
10 testRunner.dumpChildFramesAsText();
11 testRunner.waitUntilDone();
14 var log = document.getElementById('log');
15 var done = false;
17 function test() {
18 if (done) {
19 // log's not having any content implies that load event was dispatched for the second time before beforeunload is dispatched.
20 if (!log.innerHTML.length)
21 log.innerHTML = 'FAIL: beforeunload event was never dispatched.\n';
22 if (window.testRunner)
23 testRunner.notifyDone();
24 return;
26 done = true;
27 document.getElementsByTagName('iframe')[0].contentWindow.location.href = 'resources/before-unload-in-subframe-child.html';
30 function fired() {
31 if (!log.innerHTML.length)
32 log.innerHTML = 'PASS\n';
33 else
34 log.innerHTML = 'FAIL: beforeunload event was dispatched after the second load event.'
35 if (window.testRunner)
36 testRunner.notifyDone();
39 </script>
40 <iframe onload="test()" src="resources/before-unload-in-subframe-child.html"></iframe>
41 </body>
42 </html>