OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <script src="/js-test-resources/testharness.js"></script> |
| 3 <script src="/js-test-resources/testharnessreport.js"></script> |
| 4 <script> |
| 5 test(() => { |
| 6 // Note: the limit used must be same as Settings#maxBeaconTransmission. |
| 7 // First beacon request should go through, but with a zero allowance for |
| 8 // any subsequent requests. Which must fail. |
| 9 let payload = new Uint8Array(64 * 1024); |
| 10 let result = navigator.sendBeacon("resources/blank.txt", payload); |
| 11 assert_true(result); |
| 12 result = navigator.sendBeacon("resources/blank.txt", payload); |
| 13 assert_false(result); |
| 14 }, "navigator.sendBeacon() with a payload size greater than " + |
| 15 "remaining transfer allowance should fail."); |
| 16 </script> |
| 17 </html> |
OLD | NEW |