|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 * http://creativecommons.org/publicdomain/zero/1.0/ |
|
3 */ |
|
4 |
|
5 // This verifies that attempts to override the global values fails but doesn't |
|
6 // destroy the world with it |
|
7 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); |
|
8 |
|
9 const profileDir = gProfD.clone(); |
|
10 profileDir.append("extensions"); |
|
11 |
|
12 function getActiveVersion() { |
|
13 return Services.prefs.getIntPref("bootstraptest.active_version"); |
|
14 } |
|
15 |
|
16 function getInstalledVersion() { |
|
17 return Services.prefs.getIntPref("bootstraptest.installed_version"); |
|
18 } |
|
19 |
|
20 function run_test() { |
|
21 do_test_pending(); |
|
22 |
|
23 manuallyInstall(do_get_addon("test_bug740612_1"), profileDir, |
|
24 "bug740612_1@tests.mozilla.org"); |
|
25 manuallyInstall(do_get_addon("test_bug740612_2"), profileDir, |
|
26 "bug740612_2@tests.mozilla.org"); |
|
27 |
|
28 startupManager(); |
|
29 |
|
30 AddonManager.getAddonsByIDs(["bug740612_1@tests.mozilla.org", |
|
31 "bug740612_2@tests.mozilla.org"], |
|
32 function([a1, a2]) { |
|
33 do_check_neq(a1, null); |
|
34 do_check_neq(a2, null); |
|
35 do_check_eq(getInstalledVersion(), "1.0"); |
|
36 do_check_eq(getActiveVersion(), "1.0"); |
|
37 |
|
38 do_execute_soon(do_test_finished); |
|
39 }); |
|
40 } |