1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/extensions/test/xpcshell/test_bug595573.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,40 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + * http://creativecommons.org/publicdomain/zero/1.0/ 1.6 + */ 1.7 + 1.8 +// This tests if addons with UUID based ids install and stay installed 1.9 + 1.10 +const profileDir = gProfD.clone(); 1.11 +profileDir.append("extensions"); 1.12 + 1.13 +function run_test() { 1.14 + do_test_pending(); 1.15 + createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); 1.16 + 1.17 + startupManager(); 1.18 + run_test_1(); 1.19 +} 1.20 + 1.21 +function run_test_1() { 1.22 + installAllFiles([do_get_addon("test_bug595573")], function() { 1.23 + restartManager(); 1.24 + 1.25 + AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) { 1.26 + do_check_neq(a1, null); 1.27 + do_check_true(isExtensionInAddonsList(profileDir, a1.id)); 1.28 + 1.29 + do_execute_soon(run_test_2); 1.30 + }); 1.31 + }); 1.32 +} 1.33 + 1.34 +function run_test_2() { 1.35 + restartManager(); 1.36 + 1.37 + AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) { 1.38 + do_check_neq(a1, null); 1.39 + do_check_true(isExtensionInAddonsList(profileDir, a1.id)); 1.40 + 1.41 + do_execute_soon(do_test_finished); 1.42 + }); 1.43 +}