2 waitForExplicitFinish();
5 const secMan
= Cc
["@mozilla.org/scriptsecuritymanager;1"].getService(Ci
.nsIScriptSecurityManager
);
7 const uris
= ["", "about:blank"];
12 if (w
.document
== origDoc
) {
14 setTimeout(testLoad
, 10);
17 var prin
= w
.document
.nodePrincipal
;
18 isnot(prin
, null, "Loaded principal must not be null when adding " + uri
);
19 isnot(prin
, undefined, "Loaded principal must not be undefined when loading " + uri
);
20 is(secMan
.isSystemPrincipal(prin
), false,
21 "Loaded principal must not be system when loading " + uri
);
24 if (iteration
== uris
.length
) {
33 uri
= uris
[iteration
- 1];
34 w
= window
.open(uri
, "_blank", "width=10,height=10");
35 var prin
= w
.document
.nodePrincipal
;
39 isnot(prin
, null, "Forced principal must not be null when loading " + uri
);
40 isnot(prin
, undefined,
41 "Forced principal must not be undefined when loading " + uri
);
42 is(secMan
.isSystemPrincipal(prin
), false,
43 "Forced principal must not be system when loading " + uri
);
44 if (uri
== undefined) {
45 // No actual load here, so just move along.
51 // Need to poll, because load listeners on the content window won't
53 setTimeout(testLoad
, 10);