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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

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 }

mercurial