OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <script src="/resources/testharness.js"></script> | |
5 <script src="/resources/testharnessreport.js"></script> | |
6 </head> | |
7 <body> | |
8 <script> | |
9 async_test(function () { | |
10 var worker = new Worker('http://127.0.0.1:8000/security/contentSecurityPol
icy/resources/worker.php?type=multiple-headers'); | |
11 var evalBlocked = false; | |
12 var xhrBlocked = false; | |
13 var numMessages = 0; | |
14 | |
15 worker.onmessage = this.step_func(function (event) { | |
16 numMessages++; | |
17 if (event.data === "xhr blocked") | |
18 xhrBlocked = true; | |
19 if (event.data === "eval blocked") | |
20 evalBlocked = true; | |
21 | |
22 if (numMessages === 2) { | |
23 assert_true(xhrBlocked); | |
24 assert_true(evalBlocked); | |
25 this.done(); | |
26 } | |
27 }); | |
28 }, "Worker can have multiple CSP headers"); | |
29 </script> | |
30 </body> | |
31 </html> | |
OLD | NEW |