| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-reportonly-blocked.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-reportonly-blocked.php b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-reportonly-blocked.php
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..01d8ccb857696ae1dad713ca39a6dfcc73273c09
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-reportonly-blocked.php
|
| @@ -0,0 +1,26 @@
|
| +<?php
|
| + header("Content-Security-Policy-Report-Only: require-sri-for style;");
|
| +?>
|
| +<!doctype html>
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<script>
|
| + async_test(t => {
|
| + var watcher = new EventWatcher(t, document, ['securitypolicyviolation']);
|
| + watcher
|
| + .wait_for('securitypolicyviolation')
|
| + .then(t.step_func_done(e => {
|
| + assert_equals(e.blockedURI, "http://127.0.0.1:8000/security/contentSecurityPolicy/resources/style-set-red.css");
|
| + assert_equals(e.lineNumber, 15);
|
| + }));
|
| + }, "Stylesheets without integrity generate reports.");
|
| +</script>
|
| +<link rel="stylesheet" href="/security/contentSecurityPolicy/resources/style-set-red.css">
|
| +<script>
|
| + async_test(t => {
|
| + window.onload = t.step_func_done(_ => {
|
| + assert_equals(document.styleSheets.length, 1);
|
| + assert_equals(document.styleSheets[0].href, "http://127.0.0.1:8000/security/contentSecurityPolicy/resources/style-set-red.css");
|
| + });
|
| + }, "Stylesheets without integrity do not load.");
|
| +</script>
|
|
|