summaryrefslogtreecommitdiffstats
path: root/test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js')
-rw-r--r--test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js b/test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
new file mode 100644
index 0000000..4c74571
--- /dev/null
+++ b/test/wpt/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
@@ -0,0 +1,13 @@
+// META: script=/common/get-host-info.sub.js
+
+promise_test(t => {
+ const img = new Image();
+ img.src = get_host_info().HTTP_REMOTE_ORIGIN + "/fetch/cross-origin-resource-policy/resources/image.py?corp=same-site";
+ return new Promise((resolve, reject) => {
+ img.onload = resolve;
+ img.onerror = reject;
+ document.body.appendChild(img);
+ }).finally(() => {
+ img.remove();
+ });
+}, "Cross-Origin-Resource-Policy does not block Mixed Content <img>");