mirror of
https://github.com/servo/servo.git
synced 2025-10-04 02:29:12 +01:00
Update web-platform-tests to revision 81962ac8802223d038b188b6f9cb88a0a9c5beee
This commit is contained in:
parent
fe1a057bd1
commit
24183668c4
1960 changed files with 29853 additions and 10555 deletions
|
@ -5,7 +5,7 @@
|
|||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<!-- if base is used for resolving the URL to report to then we will not get a report -->
|
||||
<base href="http://nonexistent-origin.web-platform.test">
|
||||
<base href="http://nonexistent.web-platform.test">
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: navigate-to support/navigate_parent.sub.html
|
||||
Content-Security-Policy: navigate-to 'self' support/navigate_parent.sub.html
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child can't navigate the parent because the relevant policy belongs to the navigation initiator (in this case the child)");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
|
||||
<iframe srcdoc="<iframe src='support/navigate_parent.sub.html?csp=navigate-to%20%27none%27'>">
|
||||
|
||||
</body>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe srcdoc="<iframe src='support/navigate_parent.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}'>"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -12,5 +12,5 @@
|
|||
assert_equals(e.data.result, 'success');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=post_message_to_frame_owner.html">
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=post_message_to_frame_owner.html"></iframe>
|
||||
</body>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27none%27&action=post_message_to_frame_owner.html">
|
||||
</body>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&action=post_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -12,5 +12,5 @@
|
|||
assert_equals(e.data.result, 'success');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
</body>
|
|
@ -6,12 +6,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&action=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -12,5 +12,5 @@
|
|||
assert_equals(e.data.result, 'success');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=redirect_to_post_message_to_frame_owner.py">
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&action=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dpost_message_to_frame_owner.html"></iframe>
|
||||
</body>
|
|
@ -6,12 +6,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&action=redirect_to_post_message_to_frame_owner.py">
|
||||
<iframe src="support/form_action_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&action=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -14,5 +14,4 @@
|
|||
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&target=post_message_to_frame_owner.html", "_blank");
|
||||
</script>
|
||||
|
||||
</body>
|
|
@ -1,19 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27none%27&target=post_message_to_frame_owner.html", "_blank");
|
||||
</script>
|
||||
|
||||
</body>
|
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&target=post_message_to_frame_owner.html", "_blank");
|
||||
</script>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -14,5 +14,4 @@
|
|||
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
|
||||
</script>
|
||||
|
||||
</body>
|
|
@ -7,13 +7,8 @@
|
|||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
|
||||
</script>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -14,5 +14,4 @@
|
|||
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&target=redirect_to_post_message_to_frame_owner.py", "_blank");
|
||||
</script>
|
||||
|
||||
</body>
|
|
@ -7,13 +7,8 @@
|
|||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&target=redirect_to_post_message_to_frame_owner.py", "_blank");
|
||||
window.open("support/href_location_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html", "_blank");
|
||||
</script>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -14,4 +14,4 @@
|
|||
});
|
||||
</script>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&target=post_message_to_frame_owner.html">
|
||||
</body>
|
||||
</body>
|
|
@ -1,18 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<meta name="timeout" content="long">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27none%27&target=post_message_to_frame_owner.html">
|
||||
</body>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&target=post_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -14,4 +14,4 @@
|
|||
});
|
||||
</script>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
|
||||
</body>
|
||||
</body>
|
|
@ -7,12 +7,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
|
||||
</body>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -14,4 +14,4 @@
|
|||
});
|
||||
</script>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&target=redirect_to_post_message_to_frame_owner.py">
|
||||
</body>
|
||||
</body>
|
|
@ -7,12 +7,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&target=redirect_to_post_message_to_frame_owner.py">
|
||||
</body>
|
||||
<iframe src="support/link_click_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -1,17 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27none%27&target=post_message_to_frame_owner.html">
|
||||
</body>
|
|
@ -0,0 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
|
||||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27none%27&report_id={{$id:uuid()}}&target=post_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27none%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -6,12 +6,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27self%27&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html">
|
||||
<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=http%3A%2F%2F{{domains[www1]}}:{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -6,12 +6,7 @@
|
|||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the child iframe navigation is blocked");
|
||||
window.onmessage = t.step_func_done(function(e) {
|
||||
assert_equals(e.data.result, 'fail');
|
||||
assert_equals(e.data.violatedDirective, 'navigate-to');
|
||||
});
|
||||
</script>
|
||||
<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20{{location[server]}}/content-security-policy/navigate-to/support/redirect_to_post_message_to_frame_owner.py&target=redirect_to_post_message_to_frame_owner.py">
|
||||
<iframe src="support/meta_refresh_navigation.sub.html?csp=navigate-to%20%27self%27&report_id={{$id:uuid()}}&target=redirect_to_post_message_to_frame_owner.py%3Flocation%3Dhttp%3A%2F%2F{{domains[www1]}}%3A{{ports[http][0]}}%2Fcontent-security-policy%2Fnavigate-to%2Fsupport%2Fpost_message_to_frame_owner.html"></iframe>
|
||||
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20%27self%27&reportID={{$id}}'></script>
|
||||
</body>
|
|
@ -7,12 +7,6 @@
|
|||
|
||||
<body>
|
||||
<script>
|
||||
var t = async_test("Test that the parent can't navigate the child because the relevant policy belongs to the navigation initiator (in this case the parent)");
|
||||
window.addEventListener('securitypolicyviolation', t.step_func_done(function(e) {
|
||||
assert_equals(e.violatedDirective, 'navigate-to');
|
||||
}));
|
||||
window.onmessage = t.unreached_func("Should not have received a message from the child");
|
||||
|
||||
var i = document.createElement('iframe');
|
||||
var src_changed = false;
|
||||
i.onload = function() {
|
||||
|
@ -20,7 +14,8 @@
|
|||
src_changed = true;
|
||||
i.src = "support/post_message_to_frame_owner.html";
|
||||
}
|
||||
i.src = "support/wait_for_navigation.html?csp=navigate-to%20%self%27";
|
||||
i.src = "support/wait_for_navigation.html?csp=navigate-to%20%27self%27";
|
||||
document.body.appendChild(i);
|
||||
</script>
|
||||
<script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=navigate-to%20support%2Fwait_for_navigation.html'></script>
|
||||
</body>
|
|
@ -1,4 +1,5 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: navigate-to support/wait_for_navigation.html
|
||||
Set-Cookie: parent-navigates-child-blocked={{$id:uuid()}}; Path=/content-security-policy/navigate-to/
|
||||
Content-Security-Policy: navigate-to support/wait_for_navigation.html; report-uri ../support/report.py?op=put&reportID={{$id}}
|
|
@ -13,9 +13,21 @@
|
|||
<body>
|
||||
<form action='{{GET[action]}}' target='_self' id='form'>
|
||||
<input type="text" name="dummy">
|
||||
<div id="form-div"></div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
document.getElementById('form').submit();
|
||||
try {
|
||||
url = new URL("{{GET[action]}}", location.href);
|
||||
for (var p of url.searchParams) {
|
||||
var elem = document.createElement('input');
|
||||
elem.type = 'text';
|
||||
elem.name = p[0];
|
||||
elem.value = p[1];
|
||||
document.getElementById('form-div').appendChild(elem);
|
||||
}
|
||||
} catch(ex) {}
|
||||
|
||||
document.getElementById('form').submit();
|
||||
</script>
|
||||
</body>
|
|
@ -1,4 +1,4 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: {{GET[csp]}}
|
||||
Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
|
|
@ -2,12 +2,6 @@
|
|||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
window.addEventListener('securitypolicyviolation', function(e) {
|
||||
window.opener.postMessage({result: 'fail', violatedDirective: e.violatedDirective}, '*');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: {{GET[csp]}}
|
||||
Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
|
||||
|
|
|
@ -2,12 +2,6 @@
|
|||
<head>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<script>
|
||||
window.addEventListener('securitypolicyviolation', function(e) {
|
||||
top.postMessage({result: 'fail', violatedDirective: e.violatedDirective}, '*');
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: {{GET[csp]}}
|
||||
Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
});
|
||||
</script>
|
||||
|
||||
<meta http-equiv="refresh" content="1; url={{GET[target]}}">
|
||||
<meta http-equiv="refresh" content="0; url={{GET[target]}}">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: {{GET[csp]}}
|
||||
Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
Expires: Mon, 26 Jul 1997 05:00:00 GMT
|
||||
Cache-Control: no-store, no-cache, must-revalidate
|
||||
Pragma: no-cache
|
||||
Content-Security-Policy: {{GET[csp]}}
|
||||
Content-Security-Policy: {{GET[csp]}}; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
def main(request, response):
|
||||
response.status = 302
|
||||
response.headers.set("Location", "post_message_to_frame_owner.html")
|
||||
if "location" in request.GET:
|
||||
response.headers.set("Location", request.GET["location"])
|
||||
else:
|
||||
response.headers.set("Location", "post_message_to_frame_owner.html")
|
|
@ -24,18 +24,20 @@
|
|||
reportCookieName = location.pathname.split('/')[location.pathname.split('/').length - 1].split('.')[0];
|
||||
}
|
||||
|
||||
var reportID = "";
|
||||
var reportID = "{{GET[reportID]}}";
|
||||
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookieName = cookies[i].split('=')[0].trim();
|
||||
var cookieValue = cookies[i].split('=')[1].trim();
|
||||
if (reportID == "") {
|
||||
var cookies = document.cookie.split(';');
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookieName = cookies[i].split('=')[0].trim();
|
||||
var cookieValue = cookies[i].split('=')[1].trim();
|
||||
|
||||
if (cookieName == reportCookieName) {
|
||||
reportID = cookieValue;
|
||||
var cookieToDelete = cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=" + document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1);
|
||||
document.cookie = cookieToDelete;
|
||||
break;
|
||||
if (cookieName == reportCookieName) {
|
||||
reportID = cookieValue;
|
||||
var cookieToDelete = cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=" + document.location.pathname.substring(0, document.location.pathname.lastIndexOf('/') + 1);
|
||||
document.cookie = cookieToDelete;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue