gecko-dev/dom/html/test/browser_bug1081537.js
Brendan Dahl f6923ccc24 Bug 1485426 - Use createXULElement instead of createElement in XUL docs. r=bgrins
Preparing for transitioning to XHTML.

MozReview-Commit-ID: JLlmUxsvhIB

Differential Revision: https://phabricator.services.mozilla.com/D4265

--HG--
extra : moz-landing-system : lando
2018-08-25 00:16:27 +00:00

12 lines
411 B
JavaScript

// 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());