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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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