| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-resubmission-main-page-callee.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-resubmission-main-page-callee.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-resubmission-main-page-callee.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..d6334864dca8d7aa3ae4018bb2922355f84f8c33
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-resubmission-main-page-callee.html
|
| @@ -0,0 +1,20 @@
|
| +<html>
|
| + <head>
|
| + <meta http-equiv="Content-Security-Policy" content="form-action 'none'">
|
| + </head>
|
| + <body>
|
| + <script>
|
| + window.addEventListener('securitypolicyviolation', e => {
|
| + window.opener.postMessage({
|
| + "effectiveDirective": e.effectiveDirective,
|
| + "referrer": e.referrer,
|
| + "documentURI": e.documentURI,
|
| + }, "*");
|
| + });
|
| +
|
| + // Reload the page. It should trigger a form resubmission. The
|
| + // navigation is expected to be blocked by this document's CSP.
|
| + location.reload();
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|