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

Side by Side Diff: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html

Issue 2456013002: CSP: 'connect-src' should not cause exceptions. (Closed)
Patch Set: Ugh. 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 <meta http-equiv="Content-Security-Policy" content="connect-src 'self'">
3 <script src="/resources/testharness.js"></script>
4 <script src="/resources/testharnessreport.js"></script>
5 <script>
6 async_test(t => {
7 document.addEventListener("securitypolicyviolation", t.step_func_done(e => {
8 if (e.blockedURI != "http://{{domains[www]}}:{{ports[http][0]}}/common/t ext-plain.txt")
9 return;
10
11 assert_equals(e.violatedDirective, "connect-src");
12 }));
13
14 assert_true(navigator.sendBeacon("http://{{domains[www]}}:{{ports[http][0] }}/common/text-plain.txt"));
15 }, "sendBeacon should not throw.");
16 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698