mirror of
https://github.com/servo/servo.git
synced 2025-08-23 14:25:33 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
|
||||
<meta http-equiv="content-security-policy" content="script-src 'self' 'nonce-a' blob: filesystem:">
|
||||
<script nonce="a">
|
||||
// External URLs inherit policy: the header delivered with the script resource is ignored.
|
||||
fetch_tests_from_worker(new Worker("./support/script-src-self.sub.js"));
|
||||
fetch_tests_from_worker(new Worker("./support/script-src-self.sub.js?pipe=sub|header(Content-Security-Policy,script-src 'none')"));
|
||||
fetch_tests_from_worker(new Worker("./support/script-src-self.sub.js?pipe=sub|header(Content-Security-Policy,script-src *)"));
|
||||
fetch_tests_from_worker(new Worker("./support/script-src-self.sub.js?pipe=sub|header(Content-Security-Policy,default-src 'none')"));
|
||||
fetch_tests_from_worker(new Worker("./support/script-src-self.sub.js?pipe=sub|header(Content-Security-Policy,default-src *)"));
|
||||
|
||||
async_test(t => {
|
||||
fetch("./support/script-src-self.sub.js")
|
||||
.then(r => r.blob())
|
||||
.then(b => {
|
||||
// 'blob:' URLs inherit policy.
|
||||
var u = URL.createObjectURL(b);
|
||||
fetch_tests_from_worker(new Worker(u));
|
||||
|
||||
if (!window.webkitRequestFileSystem)
|
||||
return t.done();
|
||||
|
||||
|
||||
// 'filesystem:' urls inherit policy.
|
||||
window.webkitRequestFileSystem(window.TEMPORARY, 1024*1024, fs => {
|
||||
fs.root.getFile('dedicated-script-worker.js', { create: true }, entry => {
|
||||
entry.createWriter(w => {
|
||||
w.onwriteend = _ => {
|
||||
var u = entry.toURL();
|
||||
fetch_tests_from_worker(new Worker(u));
|
||||
|
||||
// explicit_done: yay.
|
||||
t.done();
|
||||
};
|
||||
w.onerror = _ => t.unreached_func();
|
||||
w.write(b);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
}, "Filesystem and blob.");
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue