summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/cors/resources/preflight-cache-partitioning.sub.html
blob: e4bbdec013953ceffe761fc9cb7f24ac2813535d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!doctype html>
<meta charset="utf-8">
<title>Helper page for testing preflight cache partitioning</title>
<iframe id="iframe" src="http://{{host}}:{{ports[http][0]}}/cors/resources/preflight-cache-partitioning-iframe.sub.html"></iframe>
<script>
window.onmessage = (e) => {
  switch (e.data.type || "") {
    case "pass":
    case "fail":
    case "loaded":
      opener.postMessage(e.data, "*");
      break;
    default:
      let iframe = document.getElementById("iframe");
      iframe.contentWindow.postMessage(e.data, "*");
      break;
  }
};

</script>