summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/file_frame_src.js
blob: 8e81f074382c1ed6942eb7e801965126c5d5e2b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"