OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/resources/testharness.js"></script> | 4 <script src="/resources/testharness.js"></script> |
5 <script src="/resources/testharnessreport.js"></script> | 5 <script src="/resources/testharnessreport.js"></script> |
6 <meta name="referrer" content="no-referrer"> | 6 <meta name="referrer" content="no-referrer"> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <script> | 9 <script> |
10 async_test(function () { | 10 async_test(function () { |
11 var workerUrl = 'http://127.0.0.1:8000/security/contentSecurityPolicy/re
sources/worker.php?type=report-referrer'; | 11 var workerUrl = 'http://127.0.0.1:8000/security/contentSecurityPolicy/re
sources/worker.php?type=report-referrer'; |
12 var worker = new Worker(workerUrl); | 12 var worker = new Worker(workerUrl); |
13 worker.onmessage = this.step_func(function (event) { | 13 worker.onmessage = this.step_func(function (event) { |
14 assert_equals(workerUrl, event.data); | 14 assert_equals(workerUrl, event.data); |
15 this.done(); | 15 this.done(); |
16 }); | 16 }); |
17 }, "Worker with no referrer policy does not inherit document's policy"); | 17 }, "Worker with no referrer policy does not inherit document's policy"); |
| 18 |
| 19 async_test(function () { |
| 20 var workerUrl = 'http://127.0.0.1:8000/security/contentSecurityPolicy/re
sources/worker.php?type=shared-report-referrer'; |
| 21 var worker = new SharedWorker(workerUrl); |
| 22 worker.port.onmessage = this.step_func(function (event) { |
| 23 assert_equals(workerUrl, event.data); |
| 24 this.done(); |
| 25 }); |
| 26 worker.port.start(); |
| 27 }, "Shared worker with no referrer policy does not inherit document's policy
"); |
18 </script> | 28 </script> |
19 </body> | 29 </body> |
20 </html> | 30 </html> |
OLD | NEW |