summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml
blob: 8a616796955c3e640730f9dd6ab84d381d182872 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?xml version="1.0" encoding="utf-8" ?>
<searchresults total_results="1111">
  <!-- Passes even though XPI URL matches an installing AddonInstall.
       Tests optional attributes. -->
  <addon>
    <name>PASS</name>
    <type id="1">Extension</type>
    <guid>test1@tests.mozilla.org</guid>
    <version>1.1</version>
    <authors>
      <author>
        <name>Test Creator 1</name>
        <link>http://localhost:%PORT%/creator1.html</link>
      </author>
      <author>
        <name>Test Developer 1</name>
        <link>http://localhost:%PORT%/developer1.html</link>
      </author>
    </authors>
    <summary>Test Summary 1</summary>
    <description>Test Description 1</description>
    <eula>Test EULA 1</eula>
    <developer_comments>Test Developer Comments 1</developer_comments>
    <icon size="32">http://localhost:%PORT%/icon1.png</icon>
    <status id="8">Preliminarily Reviewed</status>
    <compatible_applications>
      <application>
        <appID>xpcshell@tests.mozilla.org</appID>
        <min_version>1</min_version>
        <max_version>1</max_version>
      </application>
    </compatible_applications>
    <previews>
      <preview primary="1">
        <full type="image/png" width="400" height="300">
          http://localhost:%PORT%/full1-1.png
        </full>
        <thumbnail type="image/png" width="200" height="150">
          http://localhost:%PORT%/thumbnail1-1.png
        </thumbnail>
        <caption>Caption 1 - 1</caption>
      </preview>
      <preview primary="0">
        <full type="image/png">http://localhost:%PORT%/full2-1.png</full>
        <thumbnail type="image/png">http://localhost:%PORT%/thumbnail2-1.png</thumbnail>
        <caption>Caption 2 - 1</caption>
      </preview>
    </previews>
    <rating>4</rating>
    <learnmore>http://localhost:%PORT%/learnmore1.html</learnmore>
    <support>http://localhost:%PORT%/support1.html</support>
    <contribution_data>
      <link>http://localhost:%PORT%/contribution1.html</link>
      <suggested_amount currency="USD">$11.11</suggested_amount>
      <meet_developers>http://localhost:%PORT%/meetDevelopers1.html</meet_developers>
    </contribution_data>
    <reviews num="1111">http://localhost:%PORT%/review1.html</reviews>
    <total_downloads>2222</total_downloads>
    <weekly_downloads>3333</weekly_downloads>
    <daily_users>4444</daily_users>
    <last_updated epoch="1265033045">2010-02-01T14:04:05Z</last_updated>
    <install size="5555">http://localhost:%PORT%/addons/test_AddonRepository_2.xpi</install>
  </addon>

  <addon_compatibility hosted="true" id="123">
    <guid>test1@tests.mozilla.org</guid>
    <name>PASS</name>
    <version_ranges>
      <!-- Will be included -->
      <version_range type="incompatible">
        <min_version>0.1</min_version>
        <max_version>0.2</max_version>
        <compatible_applications>
          <application>
            <name>XPCShell</name>
            <application_id>666</application_id>
            <min_version>3.0</min_version>
            <max_version>4.0</max_version>
            <appID>xpcshell@tests.mozilla.org</appID>
          </application>
        </compatible_applications>
      </version_range>
      <!-- Will be included -->
      <version_range type="incompatible">
        <min_version>0.2</min_version>
        <max_version>0.3</max_version>
        <compatible_applications>
          <application>
            <name>XPCShell</name>
            <application_id>666</application_id>
            <min_version>5.0</min_version>
            <max_version>6.0</max_version>
            <appID>xpcshell@tests.mozilla.org</appID>
          </application>
        </compatible_applications>
      </version_range>
      <!-- Won't be included - invalid type attribute -->
      <version_range type="unknown">
        <min_version>9</min_version>
        <max_version>10</max_version>
        <compatible_applications>
          <application>
            <name>XPCShell</name>
            <application_id>666</application_id>
            <min_version>10.0</min_version>
            <max_version>11.0</max_version>
            <appID>xpcshell@tests.mozilla.org</appID>
          </application>
        </compatible_applications>
      </version_range>
      <!-- Won't be included - no matching appID -->
      <version_range type="incompatible">
        <min_version>0.2</min_version>
        <max_version>0.3</max_version>
        <compatible_applications>
          <application>
            <name>Unknown App</name>
            <application_id>123</application_id>
            <min_version>1.0</min_version>
            <max_version>999.0</max_version>
            <appID>unknown-app@tests.mozilla.org</appID>
          </application>
        </compatible_applications>
      </version_range>
    </version_ranges>
  </addon_compatibility>

  <!-- Fails because guid matches previously successful result -->
  <addon>
    <name>FAIL</name>
    <type id="1">Extension</type>
    <guid>test1@tests.mozilla.org</guid>
    <version>1.2</version>
    <authors><author><name>Test Creator 2</name></author></authors>
    <status id="4">Public</status>
    <summary>Add-on with a guid that matches a previously successful result should be ignored.</summary>
    <compatible_applications>
      <application>
        <appID>xpcshell@tests.mozilla.org</appID>
        <min_version>1</min_version>
        <max_version>1</max_version>
      </application>
    </compatible_applications>
    <install>http://localhost:%PORT%/test2.xpi</install>
  </addon>

  <!-- Fails because guid was not requested -->
  <addon>
    <name>FAIL</name>
    <type id="1">Extension</type>
    <guid>notRequested@tests.mozilla.org</guid>
    <version>1.3</version>
    <authors><author><name>Test Creator 3</name></author></authors>
    <status id="4">Public</status>
    <summary>Add-on with a guid that wasn't requested should be ignored.</summary>
    <compatible_applications>
      <application>
        <appID>xpcshell@tests.mozilla.org</appID>
        <min_version>1</min_version>
        <max_version>1</max_version>
      </application>
    </compatible_applications>
    <install>http://localhost:%PORT%/test3.xpi</install>
  </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="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>
      </application>
    </compatible_applications>
    <install os="UNKNOWN1">http://localhost:%PORT%/test4.xpi</install>
    <install os="UNKNOWN2">http://localhost:%PORT%/test4.xpi</install>
  </addon>
</searchresults>