Bug 1093034 - test fixes for addon manager and unknown types, r=Mossop
authorGijs Kruitbosch <gijskruitbosch@gmail.com>
Fri, 19 Dec 2014 11:57:37 +0000
changeset 220628 d5cbc65d37b0d2ae7ffcad053016478c36758155
parent 220627 de0d7a6eb13f61f990d791306ead78d6b47c81bb
child 220629 5312b07dd7e4ba073af073f163b08585c17acdcb
push id27991
push userkwierso@gmail.com
push dateFri, 19 Dec 2014 23:43:54 +0000
treeherdermozilla-central@b052018cf239 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMossop
bugs1093034
milestone37.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1093034 - test fixes for addon manager and unknown types, r=Mossop
toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.xml
toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml
toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js
--- a/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.xml
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.xml
@@ -93,17 +93,17 @@
     <weekly_downloads>3332</weekly_downloads>
     <daily_users>4442</daily_users>
     <last_updated epoch="9">1970-01-01T00:00:09Z</last_updated>
     <install size="9">http://localhost:4444/repo/2/install.xpi</install>
   </addon>
 
   <addon>
     <name>Repo Add-on 3</name>
-    <type id="9999">Unknown</type>
+    <type id="2">Theme</type>
     <guid>test_AddonRepository_3@tests.mozilla.org</guid>
     <version>2.3</version>
     <icon size="32">http://localhost/repo/3/icon.png</icon>
     <previews>
       <preview primary="1">
         <full type="image/png">http://localhost:4444/repo/3/firstFull.png</full>
         <thumbnail type="image/png">http://localhost:4444/repo/3/firstThumbnail.png</thumbnail>
         <caption>Repo Add-on 3 - First Caption</caption>
--- a/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml
@@ -164,17 +164,17 @@
   </addon>
 
   <!-- Passes even though guid matches already installed add-on,
        type is unknown, no defined author elements, status is not Public,
        no compatible applications matched, no installs compatible with OS
    -->
   <addon>
     <name>PASS</name>
-    <type id="9999">Unknown</type>
+    <type id="2">Theme</type>
     <guid>test_AddonRepository_1@tests.mozilla.org</guid>
     <version>1.4</version>
     <status id="9999">Unknown</status>
     <compatible_applications>
       <application>
         <appID>unknown@tests.mozilla.org</appID>
         <min_version>1</min_version>
         <max_version>1</max_version>
--- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository.js
@@ -100,16 +100,17 @@ var GET_RESULTS = [{
                             minVersion: 0.2,
                             maxVersion: 0.3,
                             appID: "xpcshell@tests.mozilla.org",
                             appMinVersion: 5.0,
                             appMaxVersion: 6.0
                           }]
 }, {
   id:                     "test_AddonRepository_1@tests.mozilla.org",
+  type:                   "theme",
   version:                "1.4",
   repositoryStatus:       9999,
   icons:                  {}
 }];
 
 // Results of retrieveRecommendedAddons and searchAddons
 var SEARCH_RESULTS = [{
   id:                     "test1@tests.mozilla.org",
--- a/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js
@@ -147,16 +147,17 @@ const REPOSITORY_ADDONS = [{
   reviewURL:              BASE_URL + "/repo/2/review.html",
   totalDownloads:         2222,
   weeklyDownloads:        3332,
   dailyUsers:             4442,
   sourceURI:              BASE_URL + "/repo/2/install.xpi",
   repositoryStatus:       9
 }, {
   id:                     ADDON_IDS[2],
+  type:                   "theme",
   name:                   "Repo Add-on 3",
   version:                "2.3",
   iconURL:                BASE_URL + "/repo/3/icon.png",
   icons:                  { "32": BASE_URL + "/repo/3/icon.png" },
   screenshots:            [{
                             url:          BASE_URL + "/repo/3/firstFull.png",
                             thumbnailURL: BASE_URL + "/repo/3/firstThumbnail.png",
                             caption:      "Repo Add-on 3 - First Caption"