Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 3 | */ |
michael@0 | 4 | |
michael@0 | 5 | // This tests if addons with UUID based ids install and stay installed |
michael@0 | 6 | |
michael@0 | 7 | const profileDir = gProfD.clone(); |
michael@0 | 8 | profileDir.append("extensions"); |
michael@0 | 9 | |
michael@0 | 10 | function run_test() { |
michael@0 | 11 | do_test_pending(); |
michael@0 | 12 | createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); |
michael@0 | 13 | |
michael@0 | 14 | startupManager(); |
michael@0 | 15 | run_test_1(); |
michael@0 | 16 | } |
michael@0 | 17 | |
michael@0 | 18 | function run_test_1() { |
michael@0 | 19 | installAllFiles([do_get_addon("test_bug595573")], function() { |
michael@0 | 20 | restartManager(); |
michael@0 | 21 | |
michael@0 | 22 | AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) { |
michael@0 | 23 | do_check_neq(a1, null); |
michael@0 | 24 | do_check_true(isExtensionInAddonsList(profileDir, a1.id)); |
michael@0 | 25 | |
michael@0 | 26 | do_execute_soon(run_test_2); |
michael@0 | 27 | }); |
michael@0 | 28 | }); |
michael@0 | 29 | } |
michael@0 | 30 | |
michael@0 | 31 | function run_test_2() { |
michael@0 | 32 | restartManager(); |
michael@0 | 33 | |
michael@0 | 34 | AddonManager.getAddonByID("{2f69dacd-03df-4150-a9f1-e8a7b2748829}", function(a1) { |
michael@0 | 35 | do_check_neq(a1, null); |
michael@0 | 36 | do_check_true(isExtensionInAddonsList(profileDir, a1.id)); |
michael@0 | 37 | |
michael@0 | 38 | do_execute_soon(do_test_finished); |
michael@0 | 39 | }); |
michael@0 | 40 | } |