Update web-platform-tests to revision ac12b3e9488edb436f063b11213e954ae62d5a5e

This commit is contained in:
WPT Sync Bot 2019-01-30 20:36:46 -05:00
parent 65370f17c9
commit b56a3b8e69
111 changed files with 3122 additions and 68 deletions

View file

@ -0,0 +1,60 @@
<!DOCTYPE html>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/fetch/sec-metadata/resources/helper.js></script>
<body>
<script>
async_test(t => {
let i = document.createElement('iframe');
i.src = "http://{{host}}:{{ports[http][0]}}/fetch/sec-metadata/resources/post-to-owner.py";
window.addEventListener('message', t.step_func(e => {
if (e.source != i.contentWindow)
return;
assert_header_equals(e.data, {
"dest": "",
"site": "",
"user": ""
});
t.done();
}));
document.body.appendChild(i);
}, "Non-secure same-origin iframe => No headers");
async_test(t => {
let i = document.createElement('iframe');
i.src = "http://{{hosts[][www]}}:{{ports[http][0]}}/fetch/sec-metadata/resources/post-to-owner.py";
window.addEventListener('message', t.step_func(e => {
if (e.source != i.contentWindow)
return;
assert_header_equals(e.data, {
"dest": "",
"site": "",
"user": ""
});
t.done();
}));
document.body.appendChild(i);
}, "Non-secure same-site iframe => No headers");
async_test(t => {
let i = document.createElement('iframe');
i.src = "http://{{hosts[alt][www]}}:{{ports[http][0]}}/fetch/sec-metadata/resources/post-to-owner.py";
window.addEventListener('message', t.step_func(e => {
if (e.source != i.contentWindow)
return;
assert_header_equals(e.data, {
"dest": "",
"site": "",
"user": ""
});
t.done();
}));
document.body.appendChild(i);
}, "Non-secure cross-site iframe => No headers.");
</script>

View file

@ -0,0 +1,46 @@
<!DOCTYPE html>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/fetch/sec-metadata/resources/helper.js></script>
<!-- Same-origin script -->
<script src="http://{{host}}:{{ports[http][0]}}/fetch/sec-metadata/resources/echo-as-script.py"></script>
<script>
test(t => {
t.add_cleanup(_ => { header = null; });
assert_header_equals(header, {
"dest": "",
"site": "",
"user": ""
});
}, "Non-secure same-origin script => No headers");
</script>
<!-- Same-site script -->
<script src="http://{{hosts[][www]}}:{{ports[http][0]}}/fetch/sec-metadata/resources/echo-as-script.py"></script>
<script>
test(t => {
t.add_cleanup(_ => { header = null; });
assert_header_equals(header, {
"dest": "",
"site": "",
"user": ""
});
}, "Non-secure same-site script => No headers");
</script>
<!-- Cross-site script -->
<script src="http://{{hosts[alt][www]}}:{{ports[http][0]}}/fetch/sec-metadata/resources/echo-as-script.py"></script>
<script>
test(t => {
t.add_cleanup(_ => { header = null; });
assert_header_equals(header, {
"dest": "",
"site": "",
"user": ""
});
}, "Non-secure cross-site script => No headers");
</script>