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

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:db7797bee269
1 /* Any copyright is dedicated to the Public Domain.
2 * http://creativecommons.org/publicdomain/zero/1.0/
3 */
4
5 // This tests if addons with UUID based ids install and stay installed
6
7 const profileDir = gProfD.clone();
8 profileDir.append("extensions");
9
10 function run_test() {
11 do_test_pending();
12 createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2");
13
14 startupManager();
15 run_test_1();
16 }
17
18 function run_test_1() {
19 installAllFiles([do_get_addon("test_bug595573")], function() {
20 restartManager();
21
22 AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) {
23 do_check_neq(a1, null);
24 do_check_true(isExtensionInAddonsList(profileDir, a1.id));
25
26 do_execute_soon(run_test_2);
27 });
28 });
29 }
30
31 function run_test_2() {
32 restartManager();
33
34 AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) {
35 do_check_neq(a1, null);
36 do_check_true(isExtensionInAddonsList(profileDir, a1.id));
37
38 do_execute_soon(do_test_finished);
39 });
40 }

mercurial