| Index: third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html
|
| diff --git a/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..df80cbb71e2dcff1dfbf5fb008585b9ff7256fc3
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/external/wpt/content-security-policy/connect-src/connect-src-beacon-blocked.sub.html
|
| @@ -0,0 +1,16 @@
|
| +<!DOCTYPE html>
|
| +<meta http-equiv="Content-Security-Policy" content="connect-src 'self'">
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script>
|
| + async_test(t => {
|
| + document.addEventListener("securitypolicyviolation", t.step_func_done(e => {
|
| + if (e.blockedURI != "http://{{domains[www]}}:{{ports[http][0]}}/common/text-plain.txt")
|
| + return;
|
| +
|
| + assert_equals(e.violatedDirective, "connect-src");
|
| + }));
|
| +
|
| + assert_true(navigator.sendBeacon("http://{{domains[www]}}:{{ports[http][0]}}/common/text-plain.txt"));
|
| + }, "sendBeacon should not throw.");
|
| +</script>
|
|
|