michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: michael@0: var newTab; michael@0: var newBrowser; michael@0: const secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].getService(Ci.nsIScriptSecurityManager); michael@0: michael@0: function testLoad(event) { michael@0: newBrowser.removeEventListener("load", testLoad, true); michael@0: is (event.target, newBrowser.contentDocument, "Unexpected target"); michael@0: var prin = newBrowser.contentDocument.nodePrincipal; michael@0: isnot(prin, null, "Loaded principal must not be null"); michael@0: isnot(prin, undefined, "Loaded principal must not be undefined"); michael@0: is(secMan.isSystemPrincipal(prin), false, michael@0: "Loaded principal must not be system"); michael@0: gBrowser.removeTab(newTab); michael@0: michael@0: finish(); michael@0: } michael@0: michael@0: newTab = gBrowser.addTab(); michael@0: newBrowser = gBrowser.getBrowserForTab(newTab); michael@0: newBrowser.contentWindow.location.href = "about:blank" michael@0: newBrowser.addEventListener("load", testLoad, true); michael@0: } michael@0: