toolkit/mozapps/extensions/test/xpcshell/test_bug740612.js

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/
     3  */
     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");
     9 const profileDir = gProfD.clone();
    10 profileDir.append("extensions");
    12 function getActiveVersion() {
    13   return Services.prefs.getIntPref("bootstraptest.active_version");
    14 }
    16 function getInstalledVersion() {
    17   return Services.prefs.getIntPref("bootstraptest.installed_version");
    18 }
    20 function run_test() {
    21   do_test_pending();
    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");
    28   startupManager();
    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");
    38     do_execute_soon(do_test_finished);
    39   });
    40 }

mercurial