blob: faa5fa2ad65891f27078894b729684a623652d0f [file] [log] [blame]
<!DOCTYPE HTML>
<script src="../../resources/js-test.js"></script>
<script>
description("Exercising the Beacon API");
shouldBeTrue("Object.getPrototypeOf(navigator).hasOwnProperty('sendBeacon')");
shouldBeEqualToString("typeof navigator.sendBeacon", "function");
shouldThrow("navigator.sendBeacon()");
shouldThrow("navigator.sendBeacon('http:')");
shouldThrow("navigator.sendBeacon('javascript:alert(1);')");
if (window.SharedArrayBuffer) {
shouldThrow("navigator.sendBeacon('https:', new Uint8Array(new SharedArrayBuffer(10)))");
}
</script>