Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/worker-multiple-csp-headers.html

Issue 2540983003: CSP: Dedicated workers always inherit policy. (Closed)
Patch Set: Rebase. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698