summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/file_frame_src.js
blob: d30bc0ec62f721114b95e7ace8816cac5d4da97d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
let testframe = document.getElementById("testframe");
testframe.onload = function () {
  parent.postMessage(
    {
      result: "frame-allowed",
      href: document.location.href,
    },
    "*"
  );
};
testframe.onerror = function () {
  parent.postMessage(
    {
      result: "frame-blocked",
      href: document.location.href,
    },
    "*"
  );
};
testframe.src = "file_frame_src_inner.html";