summaryrefslogtreecommitdiffstats
path: root/dom/html/test/browser_bug1081537.js
blob: 2a079be2f7f484238ac5c7bc2b0060527bfcb8c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
// This test is useful because mochitest-browser runs as an addon, so we test
// addon-scope paths here.
var ifr;
function test() {
  ifr = document.createXULElement("iframe");
  document.getElementById("main-window").appendChild(ifr);
  is(ifr.contentDocument.nodePrincipal.origin, "[System Principal]");
  ifr.contentDocument.open();
  ok(true, "Didn't throw");
}
registerCleanupFunction(() => ifr.remove());