Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Window / window-closed-immediate.html
blob346ce363a2de91e06441ec31e61784e0e0044a89
1 <!DOCTYPE HTML>
2 <body>
3 <head>
4 <script src="../../../resources/js-test.js"></script>
5 </head>
6 <script>
7 description("window.closed should return true after window.close().");
9 window.jsTestIsAsync = true;
11 if (window.testRunner) {
12 testRunner.dumpAsText();
13 testRunner.setCanOpenWindows();
15 var w;
16 function processMessage(event) {
17 if (event.data == "opened") {
18 w.close();
19 shouldBeTrue("w.closed");
20 } else if (event.data == "closed") {
21 shouldBeTrue("w.closed");
22 finishJSTest();
26 w = window.open('../../../resources/window-postmessage-open-close.html');
27 window.addEventListener("message", processMessage, false);
28 </script>
29 </body>