Skip to content

Commit cb1c8d7

Browse files
committed
Bug 1467831 [wpt PR 11427] - Fetch: basic syntax tests for Cross-Origin-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 UltraBlame original commit: 0d5c1298c115f6ccc0b1e19e7494b1dd72ae7f18
1 parent 7e95af2 commit cb1c8d7

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

testing/web-platform/meta/MANIFEST.json

+14
Original file line numberDiff line numberDiff line change
@@ -338949,6 +338949,16 @@
338949338949
{}
338950338950
]
338951338951
],
338952+
"fetch/cross-origin-resource-policy/syntax.any.js": [
338953+
[
338954+
"/fetch/cross-origin-resource-policy/syntax.any.html",
338955+
{}
338956+
],
338957+
[
338958+
"/fetch/cross-origin-resource-policy/syntax.any.worker.html",
338959+
{}
338960+
]
338961+
],
338952338962
"fetch/data-urls/base64.any.js": [
338953338963
[
338954338964
"/fetch/data-urls/base64.any.html",
@@ -569238,6 +569248,10 @@
569238569248
"cd28267293f2d20ee78d6b946fe6b8793edf1bae",
569239569249
"testharness"
569240569250
],
569251+
"fetch/cross-origin-resource-policy/syntax.any.js": [
569252+
"77377a2a82a22bf9ff637a1e3b918eda6cb28858",
569253+
"testharness"
569254+
],
569241569255
"fetch/data-urls/README.md": [
569242569256
"868cb170fa0c5626008fef77e37dee16e76b10d5",
569243569257
"support"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
3+
const crossOriginURL = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/hello.py?corp=";
4+
5+
[
6+
"same",
7+
"same, same-origin",
8+
"SAME-ORIGIN",
9+
"Same-Origin",
10+
"same-origin, <>",
11+
"same-origin, same-origin"
12+
].forEach(incorrectHeaderValue => {
13+
14+
15+
promise_test(t => {
16+
return fetch(crossOriginURL + encodeURIComponent(incorrectHeaderValue), { mode: "no-cors" });
17+
}, "Parsing Cross-Origin-Resource-Policy: " + incorrectHeaderValue);
18+
});

0 commit comments

Comments
 (0)