Bug 621018 - Some browser-chrome tests hit the network by loading about:addons, r=mossop, a=test

This commit is contained in:
Phil Ringnalda 2010-12-25 08:34:28 -08:00
Родитель bf47b4a294
Коммит 93d37b2afd
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -386,6 +386,8 @@ user_pref("browser.safebrowsing.provider.0.updateURL", "http://%(server)s/safebr
// Point update checks to the local testing server for fast failures
user_pref("extensions.update.url", "http://%(server)s/extensions-dummy/updateURL");
user_pref("extensions.blocklist.url", "http://%(server)s/extensions-dummy/blocklistURL");
// Make sure opening about:addons won't hit the network
user_pref("extensions.webservice.discoverURL", "http://%(server)s/extensions-dummy/discoveryURL");
""" % { "server" : self.webServer + ":" + str(self.httpPort) }
prefs.append(part)

Просмотреть файл

@ -5,6 +5,7 @@
// Tests that the discovery view loads properly
const PREF_BACKGROUND_UPDATE = "extensions.update.enabled";
const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
const MAIN_URL = "https://example.com/" + RELATIVE_DIR + "discovery.html";
var gManagerWindow;

Просмотреть файл

@ -26,7 +26,6 @@ const MANAGER_URI = "about:addons";
const INSTALL_URI = "chrome://mozapps/content/xpinstall/xpinstallConfirm.xul";
const PREF_LOGGING_ENABLED = "extensions.logging.enabled";
const PREF_SEARCH_MAXRESULTS = "extensions.getAddons.maxResults";
const PREF_DISCOVERURL = "extensions.webservice.discoverURL";
var gPendingTests = [];
var gTestsRun = 0;
@ -38,8 +37,6 @@ var gUseInContentUI = !gTestInWindow && ("switchToTabHavingURI" in window);
Services.prefs.setBoolPref(PREF_LOGGING_ENABLED, true);
// Turn off remote results in searches
Services.prefs.setIntPref(PREF_SEARCH_MAXRESULTS, 0);
// Default to a local discovery pane
Services.prefs.setCharPref(PREF_DISCOVERURL, "http://127.0.0.1/extensions-dummy/discoveryURL");
registerCleanupFunction(function() {
Services.prefs.clearUserPref(PREF_LOGGING_ENABLED);
try {