Bug 617382 - Set update url to something real in browser-chrome tests [r=mfinkle]
--- a/mobile/chrome/tests/browser_addons.js
+++ b/mobile/chrome/tests/browser_addons.js
@@ -11,18 +11,19 @@ const RELATIVE_DIR = "browser/mobile/chr
const TESTROOT = "http://example.com/" + RELATIVE_DIR;
const TESTROOT2 = "http://example.org/" + RELATIVE_DIR;
const PREF_LOGGING_ENABLED = "extensions.logging.enabled";
const PREF_SEARCH_MAXRESULTS = "extensions.getAddons.maxResults";
const CHROME_NAME = "mochikit";
const PREF_AUTOUPDATE_DEFAULT = "extensions.update.autoUpdateDefault"
const PREF_GETADDONS_BROWSESEARCHRESULTS = "extensions.getAddons.search.browseURL";
const PREF_GETADDONS_GETSEARCHRESULTS = "extensions.getAddons.search.url";
-const PREF_GETADDONS_GETRECOMMENDED = "extensions.getAddons.recommended.url";
+const PREF_GETADDONS_GETRECOMMENDED = "extensions.getAddons.recommended.url";
const PREF_GETADDONS_BROWSERECOMMENDED = "extensions.getAddons.recommended.browseURL";
+const PREF_GETADDONS_UPDATE = "extensions.update.url";
const SEARCH_URL = TESTROOT + "browser_details.xml";
var addons = [{
id: "addon1@tests.mozilla.org",
name : "Install Tests",
iconURL: "http://example.com/icon.png",
homepageURL: "http://example.com/",
version: "1.0",
@@ -66,16 +67,17 @@ var gSearchCount = 0;
var gProvider = null;
function test() {
waitForExplicitFinish();
Services.prefs.setCharPref(PREF_GETADDONS_GETRECOMMENDED, TESTROOT + "browser_install.xml");
Services.prefs.setCharPref(PREF_GETADDONS_BROWSERECOMMENDED, TESTROOT + "browser_install.xml");
Services.prefs.setCharPref(PREF_GETADDONS_BROWSESEARCHRESULTS, TESTROOT + "browser_install.xml");
Services.prefs.setCharPref(PREF_GETADDONS_GETSEARCHRESULTS, TESTROOT + "browser_install.xml");
+ Services.prefs.setCharPref(PREF_GETADDONS_UPDATE, TESTROOT + "browser_upgrade.rdf");
Services.prefs.setBoolPref("extensions.checkUpdateSecurity", false);
run_next_test();
}
function end_test() {
close_manager();
Services.prefs.clearUserPref(PREF_GETADDONS_GETRECOMMENDED);
Services.prefs.clearUserPref(PREF_GETADDONS_BROWSERECOMMENDED);
--- a/mobile/chrome/tests/browser_upgrade.rdf
+++ b/mobile/chrome/tests/browser_upgrade.rdf
@@ -18,9 +18,28 @@
</Description>
</em:targetApplication>
</Description>
</li>
</Seq>
</em:updates>
</Description>
+ <Description about="urn:mozilla:extension:mochikit@mozilla.org">
+ <em:updates>
+ <Seq>
+ <li>
+ <Description>
+ <em:version>1.0</em:version>
+ <em:targetApplication>
+ <Description>
+ <em:id>mochikit@mozilla.org</em:id>
+ <em:minVersion>0</em:minVersion>
+ <em:maxVersion>*</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+ </Description>
+ </li>
+ </Seq>
+ </em:updates>
+ </Description>
+
</RDF>