Update web-platform-tests to revision 2c89bbecfab9a69190906abd7610c3bc62303dd4

This commit is contained in:
WPT Sync Bot 2018-10-10 21:49:19 -04:00
parent 48bb94ded8
commit b33912a5ce
87 changed files with 1442 additions and 452 deletions

View file

@ -0,0 +1,12 @@
import time
def main(request, response):
time.sleep(1)
headers = [("Content-Type", "text/html")]
return headers, '''
<!DOCTYPE html>
<head>
</head>
<body>
DELAYED FRAME
</body
'''

View file

@ -6,6 +6,10 @@
<body>
<script>
window.addEventListener('securitypolicyviolation', function(e) {
opener.postMessage({result: 'fail', violatedDirective: e.violatedDirective}, '*');
});
try {
location.href = "{{GET[target]}}";
} catch(ex) {}

View file

@ -7,6 +7,10 @@
<body>
<a href="{{GET[target]}}" id="link">dummy link</a>
<script>
window.addEventListener('securitypolicyviolation', function(e) {
top.postMessage({result: 'fail', violatedDirective: e.violatedDirective}, '*');
});
document.getElementById('link').click();
</script>
</body>

View file

@ -3,4 +3,4 @@ def main(request, response):
if "location" in request.GET:
response.headers.set("Location", request.GET["location"])
else:
response.headers.set("Location", "post_message_to_frame_owner.html")
response.headers.set("Location", "post_message_to_frame_owner.html")

View file

@ -0,0 +1,19 @@
<!DOCTYPE html>
<head>
<script>
window.onmessage = function(e) {
if (e.data == "start_test") {
document.getElementById('link').click();
location.href = "{{location[server]}}/content-security-policy/navigate-to/support/spv-test-iframe3.sub.html";
}
}
window.addEventListener('securitypolicyviolation', function(e) {
top.postMessage({iframe: 'iframe1', violatedDirective: e.violatedDirective}, '*');
});
</script>
</head>
<body>
<a href="{{location[server]}}/content-security-policy/navigate-to/support/delayed_frame.py" id="link" target="iframe2">dummy link</a>
IFRAME 1
</body>

View file

@ -0,0 +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 {{location[server]}}/content-security-policy/navigate-to/support/spv-test-iframe3.sub.html 'unsafe-allow-redirects'; report-uri /content-security-policy/support/report.py?op=put&reportID={{GET[report_id]}}

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<head>
</head>
<body>
<script>
window.addEventListener('securitypolicyviolation', function(e) {
top.postMessage({iframe: 'iframe1', violatedDirective: e.violatedDirective}, '*');
});
setTimeout(function() {
top.postMessage("end_test", "*");
}, 4000);
</script>
IFRAME 2
</body>

View file

@ -0,0 +1,12 @@
<!DOCTYPE html>
<head>
<script>
window.addEventListener('securitypolicyviolation', function(e) {
top.postMessage({iframe: 'iframe3', violatedDirective: e.violatedDirective}, '*');
});
</script>
</head>
<body>
IFRAME 3
</body>