gecko-dev/docshell/test/browser/browser_bug388121-1.js
sakshaat d781937a67 Bug 1517483 - Get rid of nsIScriptSecurityManager::IsSystemPrincipal r=bzbarsky
Replaced instances of callers in both C++ and JS files to query the state from the principal directly.

Differential Revision: https://phabricator.services.mozilla.com/D22532

--HG--
extra : moz-landing-system : lando
2019-03-24 20:36:25 +00:00

13 lines
518 B
JavaScript

add_task(async function test() {
await BrowserTestUtils.withNewTab({ gBrowser, url: "about:blank" }, async function(newBrowser) {
await ContentTask.spawn(newBrowser, null, async function() {
var prin = content.document.nodePrincipal;
Assert.notEqual(prin, null, "Loaded principal must not be null");
Assert.notEqual(prin, undefined, "Loaded principal must not be undefined");
Assert.equal(prin.isSystemPrincipal, false,
"Loaded principal must not be system");
});
});
});