Bug 1842773 - Part 5: Add ArrayBuffer.prototype.{maxByteLength,resizable} getters...
[gecko.git] / testing / mochitest / tests / browser / browser_privileges.js
blob042a928b9c6be0597c1568a82e42a3b214043c3b
1 function test() {
2   // simple test to confirm we have chrome privileges
3   let hasPrivileges = true;
5   // this will throw an exception if we are not running with privileges
6   try {
7     // eslint-disable-next-line no-unused-vars, mozilla/use-services
8     var prefs = Cc["@mozilla.org/preferences-service;1"].getService(
9       Ci.nsIPrefBranch
10     );
11   } catch (e) {
12     hasPrivileges = false;
13   }
15   // if we get here, we must have chrome privileges
16   ok(hasPrivileges, "running with chrome privileges");