toolkit/mozapps/extensions/test/xpcshell/test_bug595573.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 tests if addons with UUID based ids install and stay installed
     7 const profileDir = gProfD.clone();
     8 profileDir.append("extensions");
    10 function run_test() {
    11   do_test_pending();
    12   createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
    14   startupManager();
    15   run_test_1();
    16 }
    18 function run_test_1() {
    19   installAllFiles([do_get_addon("test_bug595573")], function() {
    20     restartManager();
    22     AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) {
    23       do_check_neq(a1, null);
    24       do_check_true(isExtensionInAddonsList(profileDir, a1.id));
    26       do_execute_soon(run_test_2);
    27     });
    28   });
    29 }
    31 function run_test_2() {
    32   restartManager();
    34   AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) {
    35     do_check_neq(a1, null);
    36     do_check_true(isExtensionInAddonsList(profileDir, a1.id));
    38     do_execute_soon(do_test_finished);
    39   });
    40 }

mercurial