/** Test for Bug 353334 */
SimpleTest.waitForExplicitFinish();
function doPrincipalTest(id) { var doc = SpecialPowers.wrap($(id).contentDocument);
isnot(doc.nodePrincipal, undefined, "Should have a principal");
isnot(doc.nodePrincipal, null, "Should have a non-null principal");
is(doc.nodePrincipal.origin, SpecialPowers.wrap(document).nodePrincipal.origin, "Wrong principal for document in node with id='" + id + "'");
}
function checkPrincipal() {
ok(SpecialPowers.call_Instanceof(SpecialPowers.wrap(document).nodePrincipal, SpecialPowers.Ci.nsIPrincipal), "Should be a principal");
}
addLoadEvent(function() {
checkPrincipal();
for (vari of [ "one", "two", "three", "four" ]) {
doPrincipalTest(i);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.