mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-30 13:45:27 +00:00
b83bde0c17
--HG-- rename : testing/mochitest/tests/browser/browser_scope.js => browser/base/content/test/browser_scope.js
17 lines
479 B
JavaScript
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");
|
|
}
|