1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository.xml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,820 @@ 1.4 +<?xml version="1.0" encoding="utf-8" ?> 1.5 +<searchresults total_results="1111"> 1.6 + <!-- Passes all requirements --> 1.7 + <addon> 1.8 + <name>PASS</name> 1.9 + <type id="1">Extension</type> 1.10 + <guid>test1@tests.mozilla.org</guid> 1.11 + <version>1.1</version> 1.12 + <authors> 1.13 + <author> 1.14 + <name>Test Creator 1</name> 1.15 + <link>http://localhost:%PORT%/creator1.html</link> 1.16 + </author> 1.17 + </authors> 1.18 + <status id="8">Preliminarily Reviewed</status> 1.19 + <compatible_applications> 1.20 + <application> 1.21 + <appID>xpcshell@tests.mozilla.org</appID> 1.22 + <min_version>1</min_version> 1.23 + <max_version>1</max_version> 1.24 + </application> 1.25 + </compatible_applications> 1.26 + <!-- Test that a negative rating is ignored --> 1.27 + <rating>-2</rating> 1.28 + <!-- Test that a <reviews> with a blank review URL is ignored --> 1.29 + <reviews num=" 1111 "> </reviews> 1.30 + <!-- Test that a negative total_downloads is ignored --> 1.31 + <total_downloads>-2</total_downloads> 1.32 + <install>http://localhost:%PORT%/test1.xpi</install> 1.33 + </addon> 1.34 + 1.35 + <!-- Passes requirements. Tests optional attributes. Also tests that 1.36 + integer properties that are NaN in the XML are ignored --> 1.37 + <addon> 1.38 + <name>PASS</name> 1.39 + <!-- Test that extensions pass --> 1.40 + <type id="1">Extension</type> 1.41 + <guid>test2@tests.mozilla.org</guid> 1.42 + <version>1.2</version> 1.43 + <authors> 1.44 + <!-- Test that the first author becomes the creator, 1.45 + and the second one is a developer --> 1.46 + <author> 1.47 + <name>Test Creator 2</name> 1.48 + <link>http://localhost:%PORT%/creator2.html</link> 1.49 + </author> 1.50 + <author> 1.51 + <name>Test Developer 2</name> 1.52 + <link>http://localhost:%PORT%/developer2.html</link> 1.53 + </author> 1.54 + </authors> 1.55 + <summary><h1>Test Summary 2</h1><p>paragraph</p></summary> 1.56 + <description>Test Description 2<br>newline</description> 1.57 + <developer_comments>Test Developer 1.58 + Comments 2</developer_comments> 1.59 + <eula>Test EULA 2</eula> 1.60 + <icon size="64">http://localhost:%PORT%/icon2-64.png</icon> 1.61 + <icon size="48">http://localhost:%PORT%/icon2-48.png</icon> 1.62 + <icon size="32">http://localhost:%PORT%/icon2-32.png</icon> 1.63 + <status id="4">Public</status> 1.64 + <compatible_applications> 1.65 + <application> 1.66 + <appID>xpcshell@tests.mozilla.org</appID> 1.67 + <min_version>1</min_version> 1.68 + <max_version>1</max_version> 1.69 + </application> 1.70 + </compatible_applications> 1.71 + <!-- Test that multiple preview images are correctly parsed --> 1.72 + <previews> 1.73 + <preview primary="0"> 1.74 + <full type="image/png">http://localhost:%PORT%/full1-2.png</full> 1.75 + <thumbnail type="image/png">http://localhost:%PORT%/thumbnail1-2.png</thumbnail> 1.76 + </preview> 1.77 + <preview primary="0"> 1.78 + <full type="image/png">http://localhost:%PORT%/full2-2.png</full> 1.79 + <thumbnail type="image/png">http://localhost:%PORT%/thumbnail2-2.png</thumbnail> 1.80 + <caption>Caption 2</caption> 1.81 + </preview> 1.82 + </previews> 1.83 + <rating>NaN</rating> 1.84 + <!-- Test that learnmore is used as the add-on's homepageURL 1.85 + if there is no homepage defined --> 1.86 + <learnmore>http://localhost:%PORT%/learnmore2.html</learnmore> 1.87 + <homepage/> 1.88 + <support>http://localhost:%PORT%/support2.html</support> 1.89 + <contribution_data> 1.90 + <link>http://localhost:%PORT%/contribution2.html</link> 1.91 + <meet_developers>http://localhost:%PORT%/meetDevelopers2.html</meet_developers> 1.92 + </contribution_data> 1.93 + <reviews num="NaN">http://localhost:%PORT%/review2.html</reviews> 1.94 + <total_downloads>NaN</total_downloads> 1.95 + <weekly_downloads>NaN</weekly_downloads> 1.96 + <daily_users>NaN</daily_users> 1.97 + <last_updated epoch="NaN">Not an acual date</last_updated> 1.98 + <install size="NaN" os="ALL">http://localhost:%PORT%/test2.xpi</install> 1.99 + </addon> 1.100 + 1.101 + <!-- Passes requirements. Tests optional attributes with extra whitespace. --> 1.102 + <addon> 1.103 + <name> PASS </name> 1.104 + <!-- Test that themes pass --> 1.105 + <type id=" 2 ">Theme</type> 1.106 + <guid> test3@tests.mozilla.org </guid> 1.107 + <version> 1.3 </version> 1.108 + <authors> 1.109 + <!-- Test that authors with blank names are ignored --> 1.110 + <author> 1.111 + <name> </name> 1.112 + <link> http://localhost:%PORT%/ignore3.html </link> 1.113 + </author> 1.114 + <!-- Test that authors with blank links are ignored --> 1.115 + <author> 1.116 + <name> Test Creator Ignore </name> 1.117 + <link> </link> 1.118 + </author> 1.119 + <author> 1.120 + <name> Test Creator 3 </name> 1.121 + <link> http://localhost:%PORT%/creator3.html </link> 1.122 + </author> 1.123 + <author> 1.124 + <name> First Test Developer 3 </name> 1.125 + <link> http://localhost:%PORT%/developer1-3.html </link> 1.126 + </author> 1.127 + <author> 1.128 + <name> </name> 1.129 + <link> </link> 1.130 + </author> 1.131 + <author> 1.132 + <name> Second Test Developer 3 </name> 1.133 + <link> http://localhost:%PORT%/developer2-3.html </link> 1.134 + </author> 1.135 + </authors> 1.136 + <summary> Test Summary 3 </summary> 1.137 + <description> Test Description 3<br><ul><li>List item 1<li>List item 2</ul> </description> 1.138 + <developer_comments> Test Developer Comments 3 </developer_comments> 1.139 + <eula> Test EULA 3 </eula> 1.140 + <icon size="32"> http://localhost:%PORT%/icon3.png </icon> 1.141 + <status id=" 8 ">Preliminarily Reviewed</status> 1.142 + <!-- Test that an incompatible + compatible application list passes --> 1.143 + <compatible_applications> 1.144 + <application> 1.145 + <appID> unknown@tests.mozilla.org </appID> 1.146 + <min_version> 1 </min_version> 1.147 + <max_version> 1 </max_version> 1.148 + </application> 1.149 + <application> 1.150 + <appID> xpcshell@tests.mozilla.org </appID> 1.151 + <min_version> 1 </min_version> 1.152 + <max_version> 1 </max_version> 1.153 + </application> 1.154 + </compatible_applications> 1.155 + <!-- Test that primary images appear first in the add-on's screenshots array --> 1.156 + <previews> 1.157 + <preview primary=" 0 "> 1.158 + <full type=" image/png "> http://localhost:%PORT%/full2-3.png </full> 1.159 + <caption> Caption 2 - 3 </caption> 1.160 + </preview> 1.161 + <!-- Test that a preview without a <full> element is ignored --> 1.162 + <preview primary=" 0 "> 1.163 + <caption> Caption ignore - 3 </caption> 1.164 + </preview> 1.165 + <!-- Test that a preview with an empty <full> element is ignored --> 1.166 + <preview primary=" 0 "> 1.167 + <full type=" image/png "> </full> 1.168 + <caption> Caption ignore - 3 </caption> 1.169 + <preview primary=" 1 "> 1.170 + <full type=" image/png "> http://localhost:%PORT%/full1-3.png </full> 1.171 + <thumbnail type=" image/png "> http://localhost:%PORT%/thumbnail1-3.png </thumbnail> 1.172 + <caption> Caption 1 - 3 </caption> 1.173 + </preview> 1.174 + <preview primary=" 0 "> 1.175 + <full type=" image/png "> http://localhost:%PORT%/full3-3.png </full> 1.176 + <thumbnail type=" image/png "> http://localhost:%PORT%/thumbnail3-3.png </thumbnail> 1.177 + <caption> Caption 3 - 3 </caption> 1.178 + </preview> 1.179 + </preview> 1.180 + </previews> 1.181 + <!-- Test that a rating between 1 and 5 is correctly parsed --> 1.182 + <rating> 2 </rating> 1.183 + <!-- Test that hompage is used as the add-on's homepageURL 1.184 + even if learnmore is defined --> 1.185 + <learnmore> http://localhost:%PORT%/learnmore3.html </learnmore> 1.186 + <homepage> http://localhost:%PORT%/homepage3.html </homepage> 1.187 + <support> http://localhost:%PORT%/support3.html </support> 1.188 + <contribution_data> 1.189 + <link> http://localhost:%PORT%/contribution3.html </link> 1.190 + <suggested_amount currency="USD"> $11.11 </suggested_amount> 1.191 + <meet_developers> http://localhost:%PORT%/meetDevelopers3.html </meet_developers> 1.192 + </contribution_data> 1.193 + <reviews num=" 1111 "> http://localhost:%PORT%/review3.html </reviews> 1.194 + <total_downloads> 2222 </total_downloads> 1.195 + <weekly_downloads> 3333 </weekly_downloads> 1.196 + <daily_users> 4444 </daily_users> 1.197 + <last_updated epoch=" 1265033045 "> 2010-02-01T14:04:05Z </last_updated> 1.198 + <!-- Test that an incompatible install is ignored --> 1.199 + <install size=" 9999 " os=" UNKNOWN "> http://localhost:%PORT%/fail3.xpi </install> 1.200 + <!-- Test that OS matching is case-insensitive --> 1.201 + <install size=" 5555 " os=" xpCShell " hash=" sha1:c26f0b0d62e5dcddcda95074d3f3fedb9bbc26e3 "> http://localhost:%PORT%/test3.xpi </install> 1.202 + </addon> 1.203 + 1.204 + <!-- Fails because name is undefined --> 1.205 + <addon> 1.206 + <type id="1">Extension</type> 1.207 + <guid>test4@tests.mozilla.org</guid> 1.208 + <version>1.4</version> 1.209 + <authors><author><name>Test Creator 4</name></author></authors> 1.210 + <status id="4">Public</status> 1.211 + <summary>Add-on with undefined name should be ignored.</summary> 1.212 + <compatible_applications> 1.213 + <application> 1.214 + <appID>xpcshell@tests.mozilla.org</appID> 1.215 + <min_version>1</min_version> 1.216 + <max_version>1</max_version> 1.217 + </application> 1.218 + </compatible_applications> 1.219 + <install>http://localhost:%PORT%/test4.xpi</install> 1.220 + </addon> 1.221 + 1.222 + <!-- Fails because name is empty--> 1.223 + <addon> 1.224 + <name> </name> 1.225 + <type id="1">Extension</type> 1.226 + <guid>test5@tests.mozilla.org</guid> 1.227 + <version>1.5</version> 1.228 + <authors><author><name>Test Creator 5</name></author></authors> 1.229 + <status id="4">Public</status> 1.230 + <summary>Add-on with empty name should be ignored.</summary> 1.231 + <compatible_applications> 1.232 + <application> 1.233 + <appID>xpcshell@tests.mozilla.org</appID> 1.234 + <min_version>1</min_version> 1.235 + <max_version>1</max_version> 1.236 + </application> 1.237 + </compatible_applications> 1.238 + <install>http://localhost:%PORT%/test5.xpi</install> 1.239 + </addon> 1.240 + 1.241 + <!-- Fails because type is undefined --> 1.242 + <addon> 1.243 + <name>FAIL</name> 1.244 + <guid>test6@tests.mozilla.org</guid> 1.245 + <version>1.6</version> 1.246 + <authors><author><name>Test Creator 6</name></author></authors> 1.247 + <status id="4">Public</status> 1.248 + <summary>Add-on with undefined type should be ignored</summary> 1.249 + <compatible_applications> 1.250 + <application> 1.251 + <appID>xpcshell@tests.mozilla.org</appID> 1.252 + <min_version>1</min_version> 1.253 + <max_version>1</max_version> 1.254 + </application> 1.255 + </compatible_applications> 1.256 + <install>http://localhost:%PORT%/test6.xpi</install> 1.257 + </addon> 1.258 + 1.259 + <!-- Fails because type is empty --> 1.260 + <addon> 1.261 + <name>FAIL</name> 1.262 + <type id="">Empty id attribute</type> 1.263 + <guid>test7@tests.mozilla.org</guid> 1.264 + <version>1.7</version> 1.265 + <authors><author><name>Test Creator 7</name></author></authors> 1.266 + <status id="4">Public</status> 1.267 + <summary>Add-on with empty type should be ignored</summary> 1.268 + <compatible_applications> 1.269 + <application> 1.270 + <appID>xpcshell@tests.mozilla.org</appID> 1.271 + <min_version>1</min_version> 1.272 + <max_version>1</max_version> 1.273 + </application> 1.274 + </compatible_applications> 1.275 + <install>http://localhost:%PORT%/test7.xpi</install> 1.276 + </addon> 1.277 + 1.278 + <!-- Fails because type is unknown --> 1.279 + <addon> 1.280 + <name>FAIL</name> 1.281 + <type id="9999">Unknown</type> 1.282 + <guid>test8@tests.mozilla.org</guid> 1.283 + <version>1.8</version> 1.284 + <authors><author><name>Test Creator 8</name></author></authors> 1.285 + <status id="4">Public</status> 1.286 + <summary>Add-on with unknown type should be ignored</summary> 1.287 + <compatible_applications> 1.288 + <application> 1.289 + <appID>xpcshell@tests.mozilla.org</appID> 1.290 + <min_version>1</min_version> 1.291 + <max_version>1</max_version> 1.292 + </application> 1.293 + </compatible_applications> 1.294 + <install>http://localhost:%PORT%/test8.xpi</install> 1.295 + </addon> 1.296 + 1.297 + <!-- Fails because guid is undefined --> 1.298 + <addon> 1.299 + <name>FAIL</name> 1.300 + <type id="1">Extension</type> 1.301 + <version>1.9</version> 1.302 + <authors><author><name>Test Creator 9</name></author></authors> 1.303 + <status id="4">Public</status> 1.304 + <summary>Add-on with undefined guid should be ignored.</summary> 1.305 + <compatible_applications> 1.306 + <application> 1.307 + <appID>xpcshell@tests.mozilla.org</appID> 1.308 + <min_version>1</min_version> 1.309 + <max_version>1</max_version> 1.310 + </application> 1.311 + </compatible_applications> 1.312 + <install>http://localhost:%PORT%/test9.xpi</install> 1.313 + </addon> 1.314 + 1.315 + <!-- Fails because guid is empty --> 1.316 + <addon> 1.317 + <name>FAIL</name> 1.318 + <type id="1">Extension</type> 1.319 + <guid> </guid> 1.320 + <version>1.10</version> 1.321 + <authors><author><name>Test Creator 10</name></author></authors> 1.322 + <status id="4">Public</status> 1.323 + <summary>Add-on with empty guid should be ignored.</summary> 1.324 + <compatible_applications> 1.325 + <application> 1.326 + <appID>xpcshell@tests.mozilla.org</appID> 1.327 + <min_version>1</min_version> 1.328 + <max_version>1</max_version> 1.329 + </application> 1.330 + </compatible_applications> 1.331 + <install>http://localhost:%PORT%/test10.xpi</install> 1.332 + </addon> 1.333 + 1.334 + <!-- Fails because guid matches previously successful result --> 1.335 + <addon> 1.336 + <name>FAIL</name> 1.337 + <type id="1">Extension</type> 1.338 + <guid>test1@tests.mozilla.org</guid> 1.339 + <version>1.11</version> 1.340 + <authors><author><name>Test Creator 11</name></author></authors> 1.341 + <status id="4">Public</status> 1.342 + <summary>Add-on with a guid that matches a previously successful result should be ignored.</summary> 1.343 + <compatible_applications> 1.344 + <application> 1.345 + <appID>xpcshell@tests.mozilla.org</appID> 1.346 + <min_version>1</min_version> 1.347 + <max_version>1</max_version> 1.348 + </application> 1.349 + </compatible_applications> 1.350 + <install>http://localhost:%PORT%/test11.xpi</install> 1.351 + </addon> 1.352 + 1.353 + <!-- Fails because guid matches already installed add-on --> 1.354 + <addon> 1.355 + <name>FAIL</name> 1.356 + <type id="1">Extension</type> 1.357 + <guid>test_AddonRepository_1@tests.mozilla.org</guid> 1.358 + <version>1.12</version> 1.359 + <authors><author><name>Test Creator 12</name></author></authors> 1.360 + <status id="4">Public</status> 1.361 + <summary>Add-on with a guid that matches an installed Addon should be ignored.</summary> 1.362 + <compatible_applications> 1.363 + <application> 1.364 + <appID>xpcshell@tests.mozilla.org</appID> 1.365 + <min_version>1</min_version> 1.366 + <max_version>1</max_version> 1.367 + </application> 1.368 + </compatible_applications> 1.369 + <install>http://localhost:%PORT%/test12.xpi</install> 1.370 + </addon> 1.371 + 1.372 + <!-- Fails because version is undefined --> 1.373 + <addon> 1.374 + <name>FAIL</name> 1.375 + <type id="1">Extension</type> 1.376 + <guid>test13@tests.mozilla.org</guid> 1.377 + <authors><author><name>Test Creator 13</name></author></authors> 1.378 + <status id="4">Public</status> 1.379 + <summary>Add-on with undefined version should be ignored.</summary> 1.380 + <compatible_applications> 1.381 + <application> 1.382 + <appID>xpcshell@tests.mozilla.org</appID> 1.383 + <min_version>1</min_version> 1.384 + <max_version>1</max_version> 1.385 + </application> 1.386 + </compatible_applications> 1.387 + <install>http://localhost:%PORT%/test13.xpi</install> 1.388 + </addon> 1.389 + 1.390 + <!-- Fails because version is empty --> 1.391 + <addon> 1.392 + <name>FAIL</name> 1.393 + <type id="1">Extension</type> 1.394 + <guid>test14@tests.mozilla.org</guid> 1.395 + <version> </version> 1.396 + <authors><author><name>Test Creator 14</name></author></authors> 1.397 + <status id="4">Public</status> 1.398 + <summary>Add-on with empty version should be ignored.</summary> 1.399 + <compatible_applications> 1.400 + <application> 1.401 + <appID>xpcshell@tests.mozilla.org</appID> 1.402 + <min_version>1</min_version> 1.403 + <max_version>1</max_version> 1.404 + </application> 1.405 + </compatible_applications> 1.406 + <install>http://localhost:%PORT%/test14.xpi</install> 1.407 + </addon> 1.408 + 1.409 + <!-- Fails because authors undefined --> 1.410 + <addon> 1.411 + <name>FAIL</name> 1.412 + <type id="1">Extension</type> 1.413 + <guid>test15@tests.mozilla.org</guid> 1.414 + <version>1.15</version> 1.415 + <status id="4">Public</status> 1.416 + <summary>Add-on with undefined authors should be ignored.</summary> 1.417 + <compatible_applications> 1.418 + <application> 1.419 + <appID>xpcshell@tests.mozilla.org</appID> 1.420 + <min_version>1</min_version> 1.421 + <max_version>1</max_version> 1.422 + </application> 1.423 + </compatible_applications> 1.424 + <install>http://localhost:%PORT%/test15.xpi</install> 1.425 + </addon> 1.426 + 1.427 + <!-- Fails because it has no defined author elements --> 1.428 + <addon> 1.429 + <name>FAIL</name> 1.430 + <type id="1">Extension</type> 1.431 + <guid>test16@tests.mozilla.org</guid> 1.432 + <version>1.16</version> 1.433 + <authors></authors> 1.434 + <status id="4">Public</status> 1.435 + <summary>Add-on with no defined author elements should be ignored.</summary> 1.436 + <compatible_applications> 1.437 + <application> 1.438 + <appID>xpcshell@tests.mozilla.org</appID> 1.439 + <min_version>1</min_version> 1.440 + <max_version>1</max_version> 1.441 + </application> 1.442 + </compatible_applications> 1.443 + <install>http://localhost:%PORT%/test16.xpi</install> 1.444 + </addon> 1.445 + 1.446 + <!-- Fails because no non-empty author elements --> 1.447 + <addon> 1.448 + <name>FAIL</name> 1.449 + <type id="1">Extension</type> 1.450 + <guid>test17@tests.mozilla.org</guid> 1.451 + <version>1.17</version> 1.452 + <authors> 1.453 + <author><name></name></author> 1.454 + <author><name></name> </author> 1.455 + </authors> 1.456 + <status id="4">Public</status> 1.457 + <summary>Add-on with no non-empty author elements should be ignored.</summary> 1.458 + <compatible_applications> 1.459 + <application> 1.460 + <appID>xpcshell@tests.mozilla.org</appID> 1.461 + <min_version>1</min_version> 1.462 + <max_version>1</max_version> 1.463 + </application> 1.464 + </compatible_applications> 1.465 + <install>http://localhost:%PORT%/test17.xpi</install> 1.466 + </addon> 1.467 + 1.468 + <!-- Fails because status is undefined --> 1.469 + <addon> 1.470 + <name>FAIL</name> 1.471 + <type id="1">Extension</type> 1.472 + <guid>test18@tests.mozilla.org</guid> 1.473 + <version>1.18</version> 1.474 + <authors><author><name>Test Creator 18</name></author></authors> 1.475 + <summary>Add-on with undefined status should be ignored.</summary> 1.476 + <compatible_applications> 1.477 + <application> 1.478 + <appID>xpcshell@tests.mozilla.org</appID> 1.479 + <min_version>1</min_version> 1.480 + <max_version>1</max_version> 1.481 + </application> 1.482 + </compatible_applications> 1.483 + <install>http://localhost:%PORT%/test18.xpi</install> 1.484 + </addon> 1.485 + 1.486 + <!-- Fails because status is not Public --> 1.487 + <addon> 1.488 + <name>FAIL</name> 1.489 + <type id="1">Extension</type> 1.490 + <guid>test19@tests.mozilla.org</guid> 1.491 + <version>1.19</version> 1.492 + <authors><author><name>Test Creator 19</name></author></authors> 1.493 + <status id="9999">Unknown</status> 1.494 + <summary>Add-on with non-Public status should be ignored.</summary> 1.495 + <compatible_applications> 1.496 + <application> 1.497 + <appID>xpcshell@tests.mozilla.org</appID> 1.498 + <min_version>1</min_version> 1.499 + <max_version>1</max_version> 1.500 + </application> 1.501 + </compatible_applications> 1.502 + <install>http://localhost:%PORT%/test19.xpi</install> 1.503 + </addon> 1.504 + 1.505 + <!-- Fails because compatible_applications is undefined --> 1.506 + <addon> 1.507 + <name>FAIL</name> 1.508 + <type id="1">Extension</type> 1.509 + <guid>test20@tests.mozilla.org</guid> 1.510 + <version>1.20</version> 1.511 + <authors><author><name>Test Creator 20</name></author></authors> 1.512 + <status id="4">Public</status> 1.513 + <summary>Add-on with undefined compatible_applications should be ignored.</summary> 1.514 + <install>http://localhost:%PORT%/test20.xpi</install> 1.515 + </addon> 1.516 + 1.517 + <!-- Fails because no compatible applications matched --> 1.518 + <addon> 1.519 + <name>FAIL</name> 1.520 + <type id="1">Extension</type> 1.521 + <guid>test21@tests.mozilla.org</guid> 1.522 + <version>1.21</version> 1.523 + <authors><author><name>Test Creator 21</name></author></authors> 1.524 + <status id="4">Public</status> 1.525 + <summary>Add-on with no compatible applications should be ignored.</summary> 1.526 + <compatible_applications> 1.527 + <application> 1.528 + <appID>unknown@tests.mozilla.org</appID> 1.529 + <min_version>1</min_version> 1.530 + <max_version>1</max_version> 1.531 + </application> 1.532 + </compatible_applications> 1.533 + <install>http://localhost:%PORT%/test21.xpi</install> 1.534 + </addon> 1.535 + 1.536 + <!-- Fails because compatible application's min version is undefined --> 1.537 + <addon> 1.538 + <name>FAIL</name> 1.539 + <type id="1">Extension</type> 1.540 + <guid>test22@tests.mozilla.org</guid> 1.541 + <version>1.22</version> 1.542 + <authors><author><name>Test Creator 22</name></author></authors> 1.543 + <status id="4">Public</status> 1.544 + <summary>Add-on with too high of a compatible application min version should be ignored.</summary> 1.545 + <compatible_applications> 1.546 + <application> 1.547 + <appID>xpcshell@tests.mozilla.org</appID> 1.548 + <max_version>2.0</max_version> 1.549 + </application> 1.550 + </compatible_applications> 1.551 + <install>http://localhost:%PORT%/test22.xpi</install> 1.552 + </addon> 1.553 + 1.554 + <!-- Fails because compatible application's min version too high --> 1.555 + <addon> 1.556 + <name>FAIL</name> 1.557 + <type id="1">Extension</type> 1.558 + <guid>test23@tests.mozilla.org</guid> 1.559 + <version>1.23</version> 1.560 + <authors><author><name>Test Creator 23</name></author></authors> 1.561 + <status id="4">Public</status> 1.562 + <summary>Add-on with too high of a compatible application min version should be ignored.</summary> 1.563 + <compatible_applications> 1.564 + <application> 1.565 + <appID>xpcshell@tests.mozilla.org</appID> 1.566 + <min_version>1.1</min_version> 1.567 + <max_version>2.0</max_version> 1.568 + </application> 1.569 + </compatible_applications> 1.570 + <install>http://localhost:%PORT%/test23.xpi</install> 1.571 + </addon> 1.572 + 1.573 + <!-- Fails because compatible application's max version is undefined --> 1.574 + <addon> 1.575 + <name>FAIL</name> 1.576 + <type id="1">Extension</type> 1.577 + <guid>test24@tests.mozilla.org</guid> 1.578 + <version>1.24</version> 1.579 + <authors><author><name>Test Creator 24</name></author></authors> 1.580 + <status id="4">Public</status> 1.581 + <summary>Add-on with too low of a compatible application max version should be ignored.</summary> 1.582 + <compatible_applications> 1.583 + <application> 1.584 + <appID>xpcshell@tests.mozilla.org</appID> 1.585 + <min_version>0.9</min_version> 1.586 + </application> 1.587 + </compatible_applications> 1.588 + <install>http://localhost:%PORT%/test24.xpi</install> 1.589 + </addon> 1.590 + 1.591 + <!-- Fails because compatible application's max version is too low --> 1.592 + <addon> 1.593 + <name>FAIL</name> 1.594 + <type id="1">Extension</type> 1.595 + <guid>test25@tests.mozilla.org</guid> 1.596 + <version>1.25</version> 1.597 + <authors><author><name>Test Creator 25</name></author></authors> 1.598 + <status id="4">Public</status> 1.599 + <summary>Add-on with too low of a compatible application max version should be ignored.</summary> 1.600 + <compatible_applications> 1.601 + <application> 1.602 + <appID>xpcshell@tests.mozilla.org</appID> 1.603 + <min_version>0.9</min_version> 1.604 + <max_version>0.9.9</max_version> 1.605 + </application> 1.606 + </compatible_applications> 1.607 + <install>http://localhost:%PORT%/test25.xpi</install> 1.608 + </addon> 1.609 + 1.610 + <!-- Fails because XPI URL is undefined --> 1.611 + <addon> 1.612 + <name>FAIL</name> 1.613 + <type id="1">Extension</type> 1.614 + <guid>test26@tests.mozilla.org</guid> 1.615 + <version>1.26</version> 1.616 + <authors><author><name>Test Creator 26</name></author></authors> 1.617 + <status id="4">Public</status> 1.618 + <summary>Add-on with undefined XPI URL should be ignored.</summary> 1.619 + <compatible_applications> 1.620 + <application> 1.621 + <appID>xpcshell@tests.mozilla.org</appID> 1.622 + <min_version>1</min_version> 1.623 + <max_version>1</max_version> 1.624 + </application> 1.625 + </compatible_applications> 1.626 + </addon> 1.627 + 1.628 + <!-- Fails because XPI URL is empty --> 1.629 + <addon> 1.630 + <name>FAIL</name> 1.631 + <type id="1">Extension</type> 1.632 + <guid>test27@tests.mozilla.org</guid> 1.633 + <version>1.27</version> 1.634 + <authors><author><name>Test Creator 27</name></author></authors> 1.635 + <status id="4">Public</status> 1.636 + <summary>Add-on with an empty XPI URL should be ignored.</summary> 1.637 + <compatible_applications> 1.638 + <application> 1.639 + <appID>xpcshell@tests.mozilla.org</appID> 1.640 + <min_version>1</min_version> 1.641 + <max_version>1</max_version> 1.642 + </application> 1.643 + </compatible_applications> 1.644 + <install> </install> 1.645 + </addon> 1.646 + 1.647 + <!-- Fails because install not compatible with OS --> 1.648 + <addon> 1.649 + <name>FAIL</name> 1.650 + <type id="1">Extension</type> 1.651 + <guid>test28@tests.mozilla.org</guid> 1.652 + <version>1.28</version> 1.653 + <authors><author><name>Test Creator 28</name></author></authors> 1.654 + <status id="4">Public</status> 1.655 + <summary>Add-on with no installs with compatible OS should be ignored.</summary> 1.656 + <compatible_applications> 1.657 + <application> 1.658 + <appID>xpcshell@tests.mozilla.org</appID> 1.659 + <min_version>1</min_version> 1.660 + <max_version>1</max_version> 1.661 + </application> 1.662 + </compatible_applications> 1.663 + <install os="UNKNOWN1">http://localhost:%PORT%/test28.xpi</install> 1.664 + <install os="UNKNOWN2">http://localhost:%PORT%/test28.xpi</install> 1.665 + </addon> 1.666 + 1.667 + <!-- Fails because XPI URL matches an installing AddonInstall --> 1.668 + <addon> 1.669 + <name>FAIL</name> 1.670 + <type id="1">Extension</type> 1.671 + <guid>test29@tests.mozilla.org</guid> 1.672 + <version>1.29</version> 1.673 + <authors><author><name>Test Creator 29</name></author></authors> 1.674 + <status id="4">Public</status> 1.675 + <summary>Add-on with an XPI URL that matches an installing AddonInstall should be ignored.</summary> 1.676 + <compatible_applications> 1.677 + <application> 1.678 + <appID>xpcshell@tests.mozilla.org</appID> 1.679 + <min_version>1</min_version> 1.680 + <max_version>1</max_version> 1.681 + </application> 1.682 + </compatible_applications> 1.683 + <install>http://localhost:%PORT%/addons/test_AddonRepository_2.xpi</install> 1.684 + </addon> 1.685 + 1.686 + <!-- Passes because the add-on has the right payment info --> 1.687 + <addon> 1.688 + <name>PASS</name> 1.689 + <type id="1">Extension</type> 1.690 + <guid>purchase1@tests.mozilla.org</guid> 1.691 + <version>2.0</version> 1.692 + <authors> 1.693 + <author> 1.694 + <name>Test Creator - Last Passing</name> 1.695 + <link>http://localhost:%PORT%/creatorLastPassing.html</link> 1.696 + </author> 1.697 + </authors> 1.698 + <status id="4">Public</status> 1.699 + <all_compatible_os> 1.700 + <os>ALL</os> 1.701 + </all_compatible_os> 1.702 + <compatible_applications> 1.703 + <application> 1.704 + <appID>xpcshell@tests.mozilla.org</appID> 1.705 + <min_version>1</min_version> 1.706 + <max_version>1</max_version> 1.707 + </application> 1.708 + </compatible_applications> 1.709 + <rating>5</rating> 1.710 + <payment_data> 1.711 + <link>http://localhost:%PORT%/purchaseURL1</link> 1.712 + <amount amount="5">$5</amount> 1.713 + </payment_data> 1.714 + </addon> 1.715 + 1.716 + <!-- Passes because the add-on has the right payment info --> 1.717 + <addon> 1.718 + <name>PASS</name> 1.719 + <type id="1">Extension</type> 1.720 + <guid>purchase2@tests.mozilla.org</guid> 1.721 + <version>2.0</version> 1.722 + <authors> 1.723 + <author> 1.724 + <name>Test Creator - Last Passing</name> 1.725 + <link>http://localhost:%PORT%/creatorLastPassing.html</link> 1.726 + </author> 1.727 + </authors> 1.728 + <status id="4">Public</status> 1.729 + <all_compatible_os> 1.730 + <os>XPCShell</os> 1.731 + </all_compatible_os> 1.732 + <compatible_applications> 1.733 + <application> 1.734 + <appID>xpcshell@tests.mozilla.org</appID> 1.735 + <min_version>1</min_version> 1.736 + <max_version>1</max_version> 1.737 + </application> 1.738 + </compatible_applications> 1.739 + <rating>5</rating> 1.740 + <payment_data> 1.741 + <link>http://localhost:%PORT%/purchaseURL2</link> 1.742 + <amount amount="10.0">$10</amount> 1.743 + </payment_data> 1.744 + </addon> 1.745 + 1.746 + <!-- Fails because the add-on doesn't match the platform --> 1.747 + <addon> 1.748 + <name>FAIL</name> 1.749 + <type id="1">Extension</type> 1.750 + <guid>purchase3@tests.mozilla.org</guid> 1.751 + <version>2.0</version> 1.752 + <authors> 1.753 + <author> 1.754 + <name>Test Creator - Last Passing</name> 1.755 + <link>http://localhost:%PORT%/creatorLastPassing.html</link> 1.756 + </author> 1.757 + </authors> 1.758 + <status id="4">Public</status> 1.759 + <all_compatible_os> 1.760 + <os>FOO</os> 1.761 + </all_compatible_os> 1.762 + <compatible_applications> 1.763 + <application> 1.764 + <appID>xpcshell@tests.mozilla.org</appID> 1.765 + <min_version>1</min_version> 1.766 + <max_version>1</max_version> 1.767 + </application> 1.768 + </compatible_applications> 1.769 + <rating>5</rating> 1.770 + <payment_data> 1.771 + <link>http://localhost:%PORT%/purchaseURL3</link> 1.772 + <amount amount="10">$10</amount> 1.773 + </payment_data> 1.774 + </addon> 1.775 + 1.776 + <!-- Passes because the Addon that has a matching XPI URL 1.777 + has a state = STATE_AVAILABLE (non-active install). This is the 1.778 + last passing add-on. --> 1.779 + <addon> 1.780 + <name>PASS</name> 1.781 + <type id="1">Extension</type> 1.782 + <guid>test-lastPassing@tests.mozilla.org</guid> 1.783 + <version>2.0</version> 1.784 + <authors> 1.785 + <author> 1.786 + <name>Test Creator - Last Passing</name> 1.787 + <link>http://localhost:%PORT%/creatorLastPassing.html</link> 1.788 + </author> 1.789 + </authors> 1.790 + <status id="4">Public</status> 1.791 + <compatible_applications> 1.792 + <application> 1.793 + <appID>xpcshell@tests.mozilla.org</appID> 1.794 + <min_version>1</min_version> 1.795 + <max_version>1</max_version> 1.796 + </application> 1.797 + </compatible_applications> 1.798 + <!-- Test that a rating > 5 becomes a rating = 5 --> 1.799 + <rating>10</rating> 1.800 + <install>http://localhost:%PORT%/addons/test_AddonRepository_3.xpi</install> 1.801 + </addon> 1.802 + 1.803 + <!-- Fails because of MAX_RESULTS limit. The previous <addon> should 1.804 + be the last passing add-on in order to correctly test the limit. --> 1.805 + <addon> 1.806 + <name>FAIL</name> 1.807 + <type id="1">Extension</type> 1.808 + <guid>test-surpassesLimit@tests.mozilla.org</guid> 1.809 + <version>9.9</version> 1.810 + <authors><author><name>Test Creator - Surpasses Limit</name></author></authors> 1.811 + <status id="4">Public</status> 1.812 + <summary>Add-on should not be added because doing so would surpass MAX_RESULTS limit</summary> 1.813 + <compatible_applications> 1.814 + <application> 1.815 + <appID>xpcshell@tests.mozilla.org</appID> 1.816 + <min_version>1</min_version> 1.817 + <max_version>1</max_version> 1.818 + </application> 1.819 + </compatible_applications> 1.820 + <install>http://localhost:%PORT%/test-surpassesLimit.xpi</install> 1.821 + </addon> 1.822 +</searchresults> 1.823 +