2 waitForExplicitFinish();
6 const secMan
= Cc
["@mozilla.org/scriptsecuritymanager;1"].getService(Ci
.nsIScriptSecurityManager
);
8 const uris
= [undefined, "about:blank"];
11 function testLoad(event
) {
12 newBrowser
.removeEventListener("load", testLoad
, true);
13 is (event
.target
, newBrowser
.contentDocument
, "Unexpected target");
14 var prin
= newBrowser
.contentDocument
.nodePrincipal
;
15 isnot(prin
, null, "Loaded principal must not be null when adding " + uri
);
16 isnot(prin
, undefined, "Loaded principal must not be undefined when loading " + uri
);
17 is(secMan
.isSystemPrincipal(prin
), false,
18 "Loaded principal must not be system when loading " + uri
);
19 gBrowser
.removeTab(newTab
);
21 if (iteration
== uris
.length
) {
30 uri
= uris
[iteration
- 1];
31 newTab
= gBrowser
.addTab(uri
);
32 newBrowser
= gBrowser
.getBrowserForTab(newTab
);
33 newBrowser
.addEventListener("load", testLoad
, true);
34 var prin
= newBrowser
.contentDocument
.nodePrincipal
;
35 isnot(prin
, null, "Forced principal must not be null when loading " + uri
);
36 isnot(prin
, undefined,
37 "Forced principal must not be undefined when loading " + uri
);
38 is(secMan
.isSystemPrincipal(prin
), false,
39 "Forced principal must not be system when loading " + uri
);