Update web-platform-tests to revision 314de955a5102650136404f6439f22f8d838e0f4

This commit is contained in:
WPT Sync Bot 2018-05-23 21:10:23 -04:00
parent 521748c01e
commit 6b4094e2a4
133 changed files with 1609 additions and 628 deletions

View file

@ -0,0 +1,44 @@
<!DOCTYPE html>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/fetch/sec-metadata/resources/helper.js></script>
<script>
promise_test(t => {
return fetch("https://{{host}}:{{ports[https][0]}}/fetch/sec-metadata/resources/echo-as-json.py")
.then(r => r.json())
.then(j => {
assert_header_equals(j.header, {
"cause": "forced",
"destination": "\"\"",
"target": "subresource",
"site": "same-origin"
});
});
}, "Same-origin fetch");
promise_test(t => {
return fetch("https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/echo-as-json.py")
.then(r => r.json())
.then(j => {
assert_header_equals(j.header, {
"cause": "forced",
"destination": "\"\"",
"target": "subresource",
"site": "same-site"
});
});
}, "Same-site fetch");
promise_test(t => {
return fetch("https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/sec-metadata/resources/echo-as-json.py")
.then(r => r.json())
.then(j => {
assert_header_equals(j.header, {
"cause": "forced",
"destination": "\"\"",
"target": "subresource",
"site": "cross-site"
});
});
}, "Cross-site fetch");
</script>