From a60ea7078af4f75e68416aa77dfa4be060c451b0 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 3 Oct 2019 05:03:39 +0000 Subject: [PATCH] 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 https://github.com/whatwg/fetch/pull/733. -- wpt-commits: b7373b42eeac24ff6cb3ed494ffbf09e781287da wpt-pr: 11427 UltraBlame original commit: 0d5c1298c115f6ccc0b1e19e7494b1dd72ae7f18 --- testing/web-platform/meta/MANIFEST.json | 92 ++++++++++++++ .../syntax.any.js | 119 ++++++++++++++++++ 2 files changed, 211 insertions(+) create mode 100644 testing/web-platform/tests/fetch/cross-origin-resource-policy/syntax.any.js diff --git a/testing/web-platform/meta/MANIFEST.json b/testing/web-platform/meta/MANIFEST.json index e67e9f6bdcf15..8fd5c4c9e73f4 100644 --- a/testing/web-platform/meta/MANIFEST.json +++ b/testing/web-platform/meta/MANIFEST.json @@ -2073054,6 +2073054,72 @@ html " 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 @@ -3779061,6 +3779127,32 @@ testharness " fetch / +cross +- +origin +- +resource +- +policy +/ +syntax +. +any +. +js +" +: +[ +" +77377a2a82a22bf9ff637a1e3b918eda6cb28858 +" +" +testharness +" +] +" +fetch +/ data - urls diff --git a/testing/web-platform/tests/fetch/cross-origin-resource-policy/syntax.any.js b/testing/web-platform/tests/fetch/cross-origin-resource-policy/syntax.any.js new file mode 100644 index 0000000000000..9a5dcd08088f8 --- /dev/null +++ b/testing/web-platform/tests/fetch/cross-origin-resource-policy/syntax.any.js @@ -0,0 +1,119 @@ +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 += +> +{ +promise_test +( +t += +> +{ +return +fetch +( +crossOriginURL ++ +encodeURIComponent +( +incorrectHeaderValue +) +{ +mode +: +" +no +- +cors +" +} +) +; +} +" +Parsing +Cross +- +Origin +- +Resource +- +Policy +: +" ++ +incorrectHeaderValue +) +; +} +) +;