1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,187 @@ 1.4 +<?xml version="1.0" encoding="utf-8" ?> 1.5 +<searchresults total_results="1111"> 1.6 + <!-- Passes even though XPI URL matches an installing AddonInstall. 1.7 + Tests optional attributes. --> 1.8 + <addon> 1.9 + <name>PASS</name> 1.10 + <type id="1">Extension</type> 1.11 + <guid>test1@tests.mozilla.org</guid> 1.12 + <version>1.1</version> 1.13 + <authors> 1.14 + <author> 1.15 + <name>Test Creator 1</name> 1.16 + <link>http://localhost:%PORT%/creator1.html</link> 1.17 + </author> 1.18 + <author> 1.19 + <name>Test Developer 1</name> 1.20 + <link>http://localhost:%PORT%/developer1.html</link> 1.21 + </author> 1.22 + </authors> 1.23 + <summary>Test Summary 1</summary> 1.24 + <description>Test Description 1</description> 1.25 + <eula>Test EULA 1</eula> 1.26 + <developer_comments>Test Developer Comments 1</developer_comments> 1.27 + <icon size="32">http://localhost:%PORT%/icon1.png</icon> 1.28 + <status id="8">Preliminarily Reviewed</status> 1.29 + <compatible_applications> 1.30 + <application> 1.31 + <appID>xpcshell@tests.mozilla.org</appID> 1.32 + <min_version>1</min_version> 1.33 + <max_version>1</max_version> 1.34 + </application> 1.35 + </compatible_applications> 1.36 + <previews> 1.37 + <preview primary="1"> 1.38 + <full type="image/png" width="400" height="300"> 1.39 + http://localhost:%PORT%/full1-1.png 1.40 + </full> 1.41 + <thumbnail type="image/png" width="200" height="150"> 1.42 + http://localhost:%PORT%/thumbnail1-1.png 1.43 + </thumbnail> 1.44 + <caption>Caption 1 - 1</caption> 1.45 + </preview> 1.46 + <preview primary="0"> 1.47 + <full type="image/png">http://localhost:%PORT%/full2-1.png</full> 1.48 + <thumbnail type="image/png">http://localhost:%PORT%/thumbnail2-1.png</thumbnail> 1.49 + <caption>Caption 2 - 1</caption> 1.50 + </preview> 1.51 + </previews> 1.52 + <rating>4</rating> 1.53 + <learnmore>http://localhost:%PORT%/learnmore1.html</learnmore> 1.54 + <support>http://localhost:%PORT%/support1.html</support> 1.55 + <contribution_data> 1.56 + <link>http://localhost:%PORT%/contribution1.html</link> 1.57 + <suggested_amount currency="USD">$11.11</suggested_amount> 1.58 + <meet_developers>http://localhost:%PORT%/meetDevelopers1.html</meet_developers> 1.59 + </contribution_data> 1.60 + <reviews num="1111">http://localhost:%PORT%/review1.html</reviews> 1.61 + <total_downloads>2222</total_downloads> 1.62 + <weekly_downloads>3333</weekly_downloads> 1.63 + <daily_users>4444</daily_users> 1.64 + <last_updated epoch="1265033045">2010-02-01T14:04:05Z</last_updated> 1.65 + <install size="5555">http://localhost:%PORT%/addons/test_AddonRepository_2.xpi</install> 1.66 + </addon> 1.67 + 1.68 + <addon_compatibility hosted="true" id="123"> 1.69 + <guid>test1@tests.mozilla.org</guid> 1.70 + <name>PASS</name> 1.71 + <version_ranges> 1.72 + <!-- Will be included --> 1.73 + <version_range type="incompatible"> 1.74 + <min_version>0.1</min_version> 1.75 + <max_version>0.2</max_version> 1.76 + <compatible_applications> 1.77 + <application> 1.78 + <name>XPCShell</name> 1.79 + <application_id>666</application_id> 1.80 + <min_version>3.0</min_version> 1.81 + <max_version>4.0</max_version> 1.82 + <appID>xpcshell@tests.mozilla.org</appID> 1.83 + </application> 1.84 + </compatible_applications> 1.85 + </version_range> 1.86 + <!-- Will be included --> 1.87 + <version_range type="incompatible"> 1.88 + <min_version>0.2</min_version> 1.89 + <max_version>0.3</max_version> 1.90 + <compatible_applications> 1.91 + <application> 1.92 + <name>XPCShell</name> 1.93 + <application_id>666</application_id> 1.94 + <min_version>5.0</min_version> 1.95 + <max_version>6.0</max_version> 1.96 + <appID>xpcshell@tests.mozilla.org</appID> 1.97 + </application> 1.98 + </compatible_applications> 1.99 + </version_range> 1.100 + <!-- Won't be included - invalid type attribute --> 1.101 + <version_range type="unknown"> 1.102 + <min_version>9</min_version> 1.103 + <max_version>10</max_version> 1.104 + <compatible_applications> 1.105 + <application> 1.106 + <name>XPCShell</name> 1.107 + <application_id>666</application_id> 1.108 + <min_version>10.0</min_version> 1.109 + <max_version>11.0</max_version> 1.110 + <appID>xpcshell@tests.mozilla.org</appID> 1.111 + </application> 1.112 + </compatible_applications> 1.113 + </version_range> 1.114 + <!-- Won't be included - no matching appID --> 1.115 + <version_range type="incompatible"> 1.116 + <min_version>0.2</min_version> 1.117 + <max_version>0.3</max_version> 1.118 + <compatible_applications> 1.119 + <application> 1.120 + <name>Unknown App</name> 1.121 + <application_id>123</application_id> 1.122 + <min_version>1.0</min_version> 1.123 + <max_version>999.0</max_version> 1.124 + <appID>unknown-app@tests.mozilla.org</appID> 1.125 + </application> 1.126 + </compatible_applications> 1.127 + </version_range> 1.128 + </version_ranges> 1.129 + </addon_compatibility> 1.130 + 1.131 + <!-- Fails because guid matches previously successful result --> 1.132 + <addon> 1.133 + <name>FAIL</name> 1.134 + <type id="1">Extension</type> 1.135 + <guid>test1@tests.mozilla.org</guid> 1.136 + <version>1.2</version> 1.137 + <authors><author><name>Test Creator 2</name></author></authors> 1.138 + <status id="4">Public</status> 1.139 + <summary>Add-on with a guid that matches a previously successful result should be ignored.</summary> 1.140 + <compatible_applications> 1.141 + <application> 1.142 + <appID>xpcshell@tests.mozilla.org</appID> 1.143 + <min_version>1</min_version> 1.144 + <max_version>1</max_version> 1.145 + </application> 1.146 + </compatible_applications> 1.147 + <install>http://localhost:%PORT%/test2.xpi</install> 1.148 + </addon> 1.149 + 1.150 + <!-- Fails because guid was not requested --> 1.151 + <addon> 1.152 + <name>FAIL</name> 1.153 + <type id="1">Extension</type> 1.154 + <guid>notRequested@tests.mozilla.org</guid> 1.155 + <version>1.3</version> 1.156 + <authors><author><name>Test Creator 3</name></author></authors> 1.157 + <status id="4">Public</status> 1.158 + <summary>Add-on with a guid that wasn't requested should be ignored.</summary> 1.159 + <compatible_applications> 1.160 + <application> 1.161 + <appID>xpcshell@tests.mozilla.org</appID> 1.162 + <min_version>1</min_version> 1.163 + <max_version>1</max_version> 1.164 + </application> 1.165 + </compatible_applications> 1.166 + <install>http://localhost:%PORT%/test3.xpi</install> 1.167 + </addon> 1.168 + 1.169 + <!-- Passes even though guid matches already installed add-on, 1.170 + type is unknown, no defined author elements, status is not Public, 1.171 + no compatible applications matched, no installs compatible with OS 1.172 + --> 1.173 + <addon> 1.174 + <name>PASS</name> 1.175 + <type id="9999">Unknown</type> 1.176 + <guid>test_AddonRepository_1@tests.mozilla.org</guid> 1.177 + <version>1.4</version> 1.178 + <status id="9999">Unknown</status> 1.179 + <compatible_applications> 1.180 + <application> 1.181 + <appID>unknown@tests.mozilla.org</appID> 1.182 + <min_version>1</min_version> 1.183 + <max_version>1</max_version> 1.184 + </application> 1.185 + </compatible_applications> 1.186 + <install os="UNKNOWN1">http://localhost:%PORT%/test4.xpi</install> 1.187 + <install os="UNKNOWN2">http://localhost:%PORT%/test4.xpi</install> 1.188 + </addon> 1.189 +</searchresults> 1.190 +