mirror of
https://github.com/servo/servo.git
synced 2025-09-12 07:58:20 +01:00
Update web-platform-tests to revision 2c89bbecfab9a69190906abd7610c3bc62303dd4
This commit is contained in:
parent
48bb94ded8
commit
b33912a5ce
87 changed files with 1442 additions and 452 deletions
|
@ -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
|
||||
'''
|
|
@ -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) {}
|
||||
|
|
|
@ -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>
|
|
@ -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")
|
||||
|
|
|
@ -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>
|
|
@ -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]}}
|
|
@ -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>
|
|
@ -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>
|
Loading…
Add table
Add a link
Reference in a new issue