summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/fetch/cross-origin-resource-policy/scheme-restriction.https.window.js
blob: 4c7457187419e059b016d5f2602b516d3382be7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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>");