Skip to content

Commit

Permalink
Bug 1467831 [wpt PR 11427] - Fetch: basic syntax tests for Cross-Orig…
Browse files Browse the repository at this point in the history
…in-Resource-Policy, a=testonly

Automatic update from web-platform-testsFetch: basic syntax tests for Cross-Origin-Resource-Policy

Supplements #11171.

For whatwg/fetch#733.
--

wpt-commits: b7373b42eeac24ff6cb3ed494ffbf09e781287da
wpt-pr: 11427
  • Loading branch information
annevk authored and jgraham committed Jul 11, 2018
1 parent f8d543a commit bf2444f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
14 changes: 14 additions & 0 deletions testing/web-platform/meta/MANIFEST.json
Original file line number Diff line number Diff line change
Expand Up @@ -338949,6 +338949,16 @@
{}
]
],
"fetch/cross-origin-resource-policy/syntax.any.js": [
[
"/fetch/cross-origin-resource-policy/syntax.any.html",
{}
],
[
"/fetch/cross-origin-resource-policy/syntax.any.worker.html",
{}
]
],
"fetch/data-urls/base64.any.js": [
[
"/fetch/data-urls/base64.any.html",
Expand Down Expand Up @@ -569238,6 +569248,10 @@
"cd28267293f2d20ee78d6b946fe6b8793edf1bae",
"testharness"
],
"fetch/cross-origin-resource-policy/syntax.any.js": [
"77377a2a82a22bf9ff637a1e3b918eda6cb28858",
"testharness"
],
"fetch/data-urls/README.md": [
"868cb170fa0c5626008fef77e37dee16e76b10d5",
"support"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// META: script=/common/get-host-info.sub.js

const crossOriginURL = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/hello.py?corp=";

[
"same",
"same, same-origin",
"SAME-ORIGIN",
"Same-Origin",
"same-origin, <>",
"same-origin, same-origin"
].forEach(incorrectHeaderValue => {
// Note: an incorrect value results in a successful load, so this test is only meaningful in
// implementations with support for the header.
promise_test(t => {
return fetch(crossOriginURL + encodeURIComponent(incorrectHeaderValue), { mode: "no-cors" });
}, "Parsing Cross-Origin-Resource-Policy: " + incorrectHeaderValue);
});

0 comments on commit bf2444f

Please sign in to comment.