Bug 1081537 - Tests. r=bz

This commit is contained in:
Bobby Holley 2014-10-17 17:19:19 +02:00
parent 3268a57801
commit b1a0136a16
2 changed files with 12 additions and 0 deletions

View File

@ -2,3 +2,4 @@
support-files = bug592641_img.jpg
[browser_bug592641.js]
[browser_bug1081537.js]

View File

@ -0,0 +1,11 @@
// This test is useful because mochitest-browser runs as an addon, so we test
// addon-scope paths here.
let ifr;
function test() {
ifr = document.createElement('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());