Bug 887518 - Move loadAddonManager() to test_provider_addons.js. r=gps

This commit is contained in:
Stefan Mirea 2013-06-26 15:32:27 -07:00
parent 5413b28258
commit dd209f3b22
2 changed files with 14 additions and 16 deletions

View File

@ -19,19 +19,3 @@ do_get_profile();
Components.utils.import("resource://testing-common/services/healthreport/utils.jsm", ns);
ns.updateAppInfo();
}).call(this);
// The hack, it burns. This could go away if extensions code exposed its
// test environment setup functions as a testing-only JSM. See similar
// code in Sync's head_helpers.js.
let gGlobalScope = this;
function loadAddonManager() {
let ns = {};
Components.utils.import("resource://gre/modules/Services.jsm", ns);
let head = "../../../../toolkit/mozapps/extensions/test/xpcshell/head_addons.js";
let file = do_get_file(head);
let uri = ns.Services.io.newFileURI(file);
ns.Services.scriptloader.loadSubScript(uri.spec, gGlobalScope);
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
startupManager();
}

View File

@ -9,6 +9,20 @@ const {utils: Cu} = Components;
Cu.import("resource://gre/modules/Metrics.jsm");
Cu.import("resource://gre/modules/services/healthreport/providers.jsm");
// The hack, it burns. This could go away if extensions code exposed its
// test environment setup functions as a testing-only JSM. See similar
// code in Sync's head_helpers.js.
let gGlobalScope = this;
function loadAddonManager() {
let ns = {};
Components.utils.import("resource://gre/modules/Services.jsm", ns);
let head = "../../../../toolkit/mozapps/extensions/test/xpcshell/head_addons.js";
let file = do_get_file(head);
let uri = ns.Services.io.newFileURI(file);
ns.Services.scriptloader.loadSubScript(uri.spec, gGlobalScope);
createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
startupManager();
}
function run_test() {
loadAddonManager();