servo/tests/wpt/web-platform-tests/fetch/metadata/fetch-preflight.https.sub.html

32 lines
1.1 KiB
HTML

<!DOCTYPE html>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<script src=/fetch/metadata/resources/helper.js></script>
<script>
// Site
promise_test(t => {
return validate_expectations_custom_url("https://{{hosts[][www]}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py",
{
mode: "cors",
headers: { 'x-test': 'testing' }
}, {
"site": "same-site",
"user": "",
"mode": "cors",
"dest": "empty"
}, "Same-site fetch with preflight");
}, "Same-site fetch with preflight");
promise_test(t => {
return validate_expectations_custom_url("https://{{hosts[alt][www]}}:{{ports[https][0]}}/fetch/metadata/resources/echo-as-json.py",
{
mode: "cors",
headers: { 'x-test': 'testing' }
}, {
"site": "cross-site",
"user": "",
"mode": "cors",
"dest": "empty"
}, "Cross-site fetch with preflight");
}, "Cross-site fetch with preflight");
</script>