| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-none.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-none.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-none.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..1be3bb0bc44b2e320af56ac1ce5eaf0533922125
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/resources/form-action-none.html
|
| @@ -0,0 +1,28 @@
|
| +<html>
|
| + <head>
|
| + <meta http-equiv="Content-Security-Policy" content="form-action 'none'">
|
| + </head>
|
| + <body>
|
| + <script>
|
| + window.addEventListener('securitypolicyviolation', function(event) {
|
| + // Notify the parent frame or the parent window that the reload was
|
| + // blocked by the CSP.
|
| + let data = {
|
| + "blockedURI":event.blockedURI,
|
| + "effectiveDirective":event.effectiveDirective
|
| + };
|
| + if (window.opener)
|
| + window.opener.postMessage(data, "*");
|
| + else if (window.parent != window)
|
| + window.parent.postMessage(data, "*");
|
| + });
|
| +
|
| + // Notify the parent frame or the parent window that this page has been
|
| + // loaded.
|
| + if (window.opener)
|
| + window.opener.postMessage("page loaded", "*");
|
| + else if (window.parent != window)
|
| + window.parent.postMessage("page loaded", "*");
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|