Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /connection-allowlist/tentative/fetch.window.html - WPT Dashboard Interop Dashboard
// META: script=/common/get-host-info.sub.js
//
// The following tests assume the policy `Connection-Allowlist: (response-origin)` has been set.
promise_test(async t => {
const r = await fetch("/common/blank-with-cors.html", { mode: "cors", credential: "omit" });
assert_equals(r.status, 200);
}, "Same-origin fetches succeed when `response-origin` is specified.");
promise_test(async t => {
const fetcher = fetch(get_host_info().HTTPS_REMOTE_ORIGIN + "/common/blank-with-cors.html", { mode: "cors", credential: "omit" });
return promise_rejects_js(t, TypeError, fetcher);
}, "Cross-origin fetches fail when `response-origin` is specified.");