| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-blocked.php
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/style-enforce-blocked.php b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-blocked.php
|
| similarity index 57%
|
| copy from third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/style-enforce-blocked.php
|
| copy to third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-blocked.php
|
| index 3d5a834a031fd907067eab8c12f0d5d4a21b592a..c0101ad865a87942a53776640b98ef171ea17ae5 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/style-enforce-blocked.php
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-blocked.php
|
| @@ -1,5 +1,5 @@
|
| <?php
|
| - header("Content-Security-Policy: style-src 'nonce-abc'");
|
| + header("Content-Security-Policy: require-sri-for style;");
|
| ?>
|
| <!doctype html>
|
| <script src="/resources/testharness.js"></script>
|
| @@ -9,27 +9,17 @@
|
| var watcher = new EventWatcher(t, document, ['securitypolicyviolation','securitypolicyviolation']);
|
| watcher
|
| .wait_for('securitypolicyviolation')
|
| - .then(t.step_func(e => {
|
| - assert_equals(e.blockedURI, "inline");
|
| - assert_equals(e.lineNumber, 24);
|
| - return watcher.wait_for('securitypolicyviolation');
|
| - }))
|
| .then(t.step_func_done(e => {
|
| assert_equals(e.blockedURI, "http://127.0.0.1:8000/security/contentSecurityPolicy/style-set-red.css");
|
| - assert_equals(e.lineNumber, 25);
|
| + assert_equals(e.lineNumber, 15);
|
| }));
|
| - }, "Incorrectly nonced style blocks generate reports.");
|
| + }, "Stylesheets without integrity generate reports.");
|
| </script>
|
| -<style>
|
| - #test1 {
|
| - color: rgba(1,1,1,1);
|
| - }
|
| -</style>
|
| -<link rel="stylesheet" href="/security/contentSecurityPolicy/style-set-red.css" nonce="xyz">
|
| +<link rel="stylesheet" href="/security/contentSecurityPolicy/style-set-red.css">
|
| <script>
|
| async_test(t => {
|
| window.onload = t.step_func_done(_ => {
|
| assert_equals(document.styleSheets.length, 0);
|
| });
|
| - }, "Incorrectly nonced stylesheets do not load.");
|
| + }, "Stylesheets without integrity do not load.");
|
| </script>
|
|
|