From d1178c7eab7cce3c7bdb5ef3e4b5e25db23def45 Mon Sep 17 00:00:00 2001 From: Dave Townsend Date: Wed, 21 Mar 2012 17:30:19 +1300 Subject: [PATCH] Bug 735069 - Some add-ons manager tests are pinging AMO. r=Unfocused --- .../extensions/test/xpcshell/test_AddonRepository_cache.js | 2 +- toolkit/mozapps/extensions/test/xpcshell/test_update.js | 5 +++-- .../extensions/test/xpcshell/test_update_ignorecompat.js | 6 +++--- .../extensions/test/xpcshell/test_update_strictcompat.js | 5 +++-- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js index 35eb73698c9..b2b1508d95b 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js @@ -674,6 +674,7 @@ function run_test_12() { // database, and that XPI add-ons still do not use any of repository properties function run_test_13() { check_database_exists(true); + Services.prefs.setCharPref(PREF_GETADDONS_BYIDS_PERF, GETADDONS_EMPTY); trigger_background_update(function() { // Database should have been deleted @@ -690,7 +691,6 @@ function run_test_13() { // enabled but has no information function run_test_14() { Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true); - Services.prefs.setCharPref(PREF_GETADDONS_BYIDS, GETADDONS_EMPTY); trigger_background_update(function() { check_database_exists(true); diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_update.js b/toolkit/mozapps/extensions/test/xpcshell/test_update.js index 0620e6fd387..29e27e73ff5 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_update.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_update.js @@ -6,7 +6,7 @@ const PREF_MATCH_OS_LOCALE = "intl.locale.matchOS"; const PREF_SELECTED_LOCALE = "general.useragent.locale"; -const PREF_GETADDONS_BYIDS = "extensions.getAddons.getWithPerformance.url"; +const PREF_GETADDONS_BYIDS_PERFORMANCE = "extensions.getAddons.getWithPerformance.url"; const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled"; // The test extension uses an insecure update url. @@ -1095,7 +1095,8 @@ function run_test_17() { } }); - Services.prefs.setCharPref(PREF_GETADDONS_BYIDS, "http://localhost:4444/data/test_update.xml"); + Services.prefs.setCharPref(PREF_GETADDONS_BYIDS_PERFORMANCE, + "http://localhost:4444/data/test_update.xml"); Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true); // Fake a timer event gInternalManager.notify(null); diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js b/toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js index 51dce18dca2..82ebd925edf 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_update_ignorecompat.js @@ -5,8 +5,7 @@ // This verifies that add-on update checks work correctly when compatibility // check is disabled. - -const PREF_GETADDONS_BYIDS = "extensions.getAddons.get.url"; +const PREF_GETADDONS_BYIDS_PERFORMANCE = "extensions.getAddons.getWithPerformance.url"; const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled"; // The test extension uses an insecure update url. @@ -57,7 +56,8 @@ function run_test_1() { } }); - Services.prefs.setCharPref(PREF_GETADDONS_BYIDS, "http://localhost:4444/data/test_update.xml"); + Services.prefs.setCharPref(PREF_GETADDONS_BYIDS_PERFORMANCE, + "http://localhost:4444/data/test_update.xml"); Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true); // Fake a timer event gInternalManager.notify(null); diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js b/toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js index d71ca792ddd..df56708cb05 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_update_strictcompat.js @@ -6,7 +6,7 @@ const PREF_MATCH_OS_LOCALE = "intl.locale.matchOS"; const PREF_SELECTED_LOCALE = "general.useragent.locale"; -const PREF_GETADDONS_BYIDS = "extensions.getAddons.get.url"; +const PREF_GETADDONS_BYIDS_PERFORMANCE = "extensions.getAddons.getWithPerformance.url"; const PREF_GETADDONS_CACHE_ENABLED = "extensions.getAddons.cache.enabled"; // The test extension uses an insecure update url. @@ -1049,7 +1049,8 @@ function run_test_16() { } }); - Services.prefs.setCharPref(PREF_GETADDONS_BYIDS, "http://localhost:4444/data/test_update.xml"); + Services.prefs.setCharPref(PREF_GETADDONS_BYIDS_PERFORMANCE, + "http://localhost:4444/data/test_update.xml"); Services.prefs.setBoolPref(PREF_GETADDONS_CACHE_ENABLED, true); // Fake a timer event gInternalManager.notify(null);