summaryrefslogtreecommitdiffstats
path: root/dom/settings/tests/file_loadserver.js
blob: a919d9690ad08d378e12f0ac787861136642a87a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var Ci = Components.interfaces;
var Cc = Components.classes;
var Cu = Components.utils;

// Stolen from SpecialPowers, since at this point we don't know we're in a test.
var isMainProcess = function() {
  try {
    return Cc["@mozilla.org/xre/app-info;1"].
        getService(Ci.nsIXULRuntime).
        processType == Ci.nsIXULRuntime.PROCESS_TYPE_DEFAULT;
  } catch (e) { }
  return true;
};

if (isMainProcess()) {
  Components.utils.import("resource://gre/modules/SettingsRequestManager.jsm");
}