OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/js-test-resources/js-test.js"></script> | 4 <script src="/js-test-resources/js-test.js"></script> |
5 <script> | 5 <script> |
6 description("Testing navigator.sendBeacon() within same origin."); | 6 description("Testing navigator.sendBeacon() within same origin."); |
7 | 7 |
8 window.jsTestIsAsync = true; | 8 window.jsTestIsAsync = true; |
9 | 9 |
10 var binary_array = new Uint32Array(10); | 10 var binary_array = new Uint32Array(10); |
11 for (var i = 0; i < binary_array.length; i++) { | 11 for (var i = 0; i < binary_array.length; i++) { |
12 binary_array[i] = 64 + i; | 12 binary_array[i] = 64 + i; |
13 } | 13 } |
14 | 14 |
15 var blob = new Blob(["hello", " ", "world"]); | 15 var blob = new Blob(["hello", " ", "world"], {type: "text/plain;from-beacon=true
"}); |
16 var form = new FormData(); | 16 var form = new FormData(); |
17 form.append("key", "value"); | 17 form.append("key", "value"); |
18 | 18 |
19 var tests = [ | 19 var tests = [ |
20 "SameOrigin", | 20 "SameOrigin", |
21 binary_array, | 21 binary_array, |
22 blob, | 22 blob, |
23 form]; | 23 form]; |
24 | 24 |
25 var payload; | 25 var payload; |
(...skipping 26 matching lines...) Expand all Loading... |
52 testRunner.waitUntilDone(); | 52 testRunner.waitUntilDone(); |
53 testRunner.dumpPingLoaderCallbacks(); | 53 testRunner.dumpPingLoaderCallbacks(); |
54 } | 54 } |
55 testOne(); | 55 testOne(); |
56 } | 56 } |
57 </script> | 57 </script> |
58 </head> | 58 </head> |
59 <body onload="test();"> | 59 <body onload="test();"> |
60 </body> | 60 </body> |
61 </html> | 61 </html> |
OLD | NEW |