Bug 617382 - Set update url to something real in browser-chrome tests [r=mfinkle]
authorWes Johnston <wjohnston@mozilla.com>
Tue, 07 Dec 2010 10:38:00 -0800
changeset 67081 88568f81b651ccbd201cb49d2488152c1ba252fd
parent 67080 1feeb7aca71a3c80d12cbef3d65758f10fbe9604
child 67082 a6e31a63a29ba39c8f66a97639a4aecfd4f23f07
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle
bugs617382
Bug 617382 - Set update url to something real in browser-chrome tests [r=mfinkle]
mobile/chrome/tests/browser_addons.js
mobile/chrome/tests/browser_upgrade.rdf
--- 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>