OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <script src="../../resources/js-test.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 description("Exercising the Beacon API"); | 4 description("Exercising the Beacon API"); |
5 | 5 |
6 shouldBeTrue("Object.getPrototypeOf(navigator).hasOwnProperty('sendBeacon')"); | 6 shouldBeTrue("Object.getPrototypeOf(navigator).hasOwnProperty('sendBeacon')"); |
7 shouldBeEqualToString("typeof navigator.sendBeacon", "function"); | 7 shouldBeEqualToString("typeof navigator.sendBeacon", "function"); |
8 shouldThrow("navigator.sendBeacon()"); | 8 shouldThrow("navigator.sendBeacon()"); |
9 shouldThrow("navigator.sendBeacon('http:')"); | 9 shouldThrow("navigator.sendBeacon('http:')"); |
10 shouldThrow("navigator.sendBeacon('javascript:alert(1);')"); | 10 shouldThrow("navigator.sendBeacon('javascript:alert(1);')"); |
| 11 |
| 12 if (window.SharedArrayBuffer) { |
| 13 shouldThrow("navigator.sendBeacon('https:', new Uint8Array(new SharedArrayBuff
er(10)))"); |
| 14 } |
| 15 |
11 </script> | 16 </script> |
OLD | NEW |