| Index: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-resubmission-window-reload-from-child.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-resubmission-window-reload-from-child.html b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-resubmission-window-reload-from-child.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..388b52d716b4e5214daa8d77e7f4d6246508de90
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/1.1/form-action-resubmission-window-reload-from-child.html
|
| @@ -0,0 +1,34 @@
|
| +<!DOCTYPE html>
|
| +<!--
|
| + This test documents the current behavior with Content-Security-Policy and
|
| + form resubmission. It makes a first navigation with a form submission in a
|
| + new window and then the window reloads itself. This is a form resubmission.
|
| + The thing is that the window has the "form-action 'none'" policy and the
|
| + navigation is blocked.
|
| +-->
|
| +<script src="/resources/testharness.js"></script>
|
| +<script src="/resources/testharnessreport.js"></script>
|
| +<html>
|
| + <body>
|
| + <form
|
| + id="form"
|
| + method="post"
|
| + target="popup"
|
| + action="/security/contentSecurityPolicy/resources/form-action-none-and-reload.html">
|
| + </form>
|
| +
|
| + <script>
|
| + async_test(t => {
|
| + var popup = window.open("", "popup");
|
| + window.addEventListener("message", t.step_func(e => {
|
| + assert_equals(e.source, popup);
|
| + assert_equals(e.data.effectiveDirective, "form-action");
|
| + assert_equals(e.data.blockedURI, location.origin + "/security/contentSecurityPolicy/resources/form-action-none-and-reload.html");
|
| + popup.close();
|
| + t.done();
|
| + }));
|
| + document.getElementById("form").submit();
|
| + }, "The form resubmission should be blocked by the new window's CSP");
|
| + </script>
|
| + </body>
|
| +</html>
|
|
|