| Index: LayoutTests/http/tests/navigation/beacon-detached-no-crash.html
|
| diff --git a/LayoutTests/http/tests/navigation/beacon-detached-no-crash.html b/LayoutTests/http/tests/navigation/beacon-detached-no-crash.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5d0f0b7e4b0f583a0537290e5e7d0a17e9c93834
|
| --- /dev/null
|
| +++ b/LayoutTests/http/tests/navigation/beacon-detached-no-crash.html
|
| @@ -0,0 +1,28 @@
|
| +<!DOCTYPE HTML>
|
| +<html>
|
| +<head>
|
| +<script src="/js-test-resources/js-test.js"></script>
|
| +<script>
|
| +description("Accessing Navigator sendBeacon methods on a closed window.");
|
| +
|
| +window.jsTestIsAsync = true;
|
| +
|
| +var w;
|
| +function processMessage(event) {
|
| + if (event.data == "opened") {
|
| + w.close();
|
| + } else if (event.data == "closed") {
|
| + shouldThrow("w.navigator.sendBeacon()");
|
| + shouldBeFalse("w.navigator.sendBeacon('resources/blank.txt', 'detached-should-return false')");
|
| + finishJSTest();
|
| + }
|
| +}
|
| +
|
| +if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.setCanOpenWindows();
|
| + testRunner.waitUntilDone();
|
| +}
|
| +w = window.open('resources/beacon-detached-no-crash-new-window.html');
|
| +window.addEventListener("message", processMessage, false);
|
| +</script>
|
|
|