| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE HTML> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="/js-test-resources/js-test.js"></script> | |
| 5 <script> | |
| 6 description("Accessing Navigator sendBeacon methods on a closed window."); | |
| 7 | |
| 8 window.jsTestIsAsync = true; | |
| 9 | |
| 10 var w; | |
| 11 function processMessage(event) { | |
| 12 if (event.data == "opened") { | |
| 13 w.close(); | |
| 14 } else if (event.data == "closed") { | |
| 15 shouldThrow("w.navigator.sendBeacon()"); | |
| 16 shouldBeFalse("w.navigator.sendBeacon('resources/blank.txt', 'detached-s
hould-return false')"); | |
| 17 finishJSTest(); | |
| 18 } | |
| 19 } | |
| 20 | |
| 21 if (window.testRunner) { | |
| 22 testRunner.dumpAsText(); | |
| 23 testRunner.setCanOpenWindows(); | |
| 24 testRunner.waitUntilDone(); | |
| 25 } | |
| 26 w = window.open('/js-test-resources/window-postmessage-open-close.html'); | |
| 27 window.addEventListener("message", processMessage, false); | |
| 28 </script> | |
| OLD | NEW |