michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/publicdomain/zero/1.0/ michael@0: */ michael@0: michael@0: // This verifies that attempts to override the global values fails but doesn't michael@0: // destroy the world with it michael@0: createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); michael@0: michael@0: const profileDir = gProfD.clone(); michael@0: profileDir.append("extensions"); michael@0: michael@0: function getActiveVersion() { michael@0: return Services.prefs.getIntPref("bootstraptest.active_version"); michael@0: } michael@0: michael@0: function getInstalledVersion() { michael@0: return Services.prefs.getIntPref("bootstraptest.installed_version"); michael@0: } michael@0: michael@0: function run_test() { michael@0: do_test_pending(); michael@0: michael@0: manuallyInstall(do_get_addon("test_bug740612_1"), profileDir, michael@0: "bug740612_1@tests.mozilla.org"); michael@0: manuallyInstall(do_get_addon("test_bug740612_2"), profileDir, michael@0: "bug740612_2@tests.mozilla.org"); michael@0: michael@0: startupManager(); michael@0: michael@0: AddonManager.getAddonsByIDs(["bug740612_1@tests.mozilla.org", michael@0: "bug740612_2@tests.mozilla.org"], michael@0: function([a1, a2]) { michael@0: do_check_neq(a1, null); michael@0: do_check_neq(a2, null); michael@0: do_check_eq(getInstalledVersion(), "1.0"); michael@0: do_check_eq(getActiveVersion(), "1.0"); michael@0: michael@0: do_execute_soon(do_test_finished); michael@0: }); michael@0: }