gecko-dev/testing/mochitest/tests/browser/browser_privileges.js
Mark Finkle b83bde0c17 Bug 484127 - Move browser_scope.js into browser/; r=gavin.sharp
--HG--
rename : testing/mochitest/tests/browser/browser_scope.js => browser/base/content/test/browser_scope.js
2009-03-19 15:57:55 +01:00

17 lines
479 B
JavaScript

function test() {
// simple test to confirm we have chrome privileges
let hasPrivileges = true;
// this will throw an exception if we are not running with privileges
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"].
getService(Components.interfaces.nsIPrefBranch);
}
catch (e) {
hasPrivileges = false;
}
// if we get here, we must have chrome privileges
ok(hasPrivileges, "running with chrome privileges");
}