4 <script src="/js-test-resources/js-test.js"></script>
6 description("Testing navigator.sendBeacon() cross-origin.");
8 window.jsTestIsAsync = true;
11 if (window.testRunner) {
12 testRunner.dumpAsText();
13 testRunner.waitUntilDone();
14 //testRunner.dumpPingLoaderCallbacks();
17 shouldBeTrue('navigator.sendBeacon("http://localhost:8000/blink/sendbeacon/resources/save-beacon.py?name=cross-origin", "CrossOrigin");');
18 var xhr = new XMLHttpRequest();
19 xhr.open("GET", "resources/check-beacon.py?name=cross-origin");
20 xhr.onload = function () {
21 var lines = xhr.responseText.split("\n");
26 xhr.onerror = function () {
27 testFailed("Unable to fetch beacon status");
34 <body onload="test();">