Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* Any copyright is dedicated to the Public Domain. |
michael@0 | 2 | * http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 3 | */ |
michael@0 | 4 | |
michael@0 | 5 | // This tests that all properties are read from the install manifests and that |
michael@0 | 6 | // items are correctly enabled/disabled based on them (blocklist tests are |
michael@0 | 7 | // elsewhere) |
michael@0 | 8 | |
michael@0 | 9 | function run_test() { |
michael@0 | 10 | createAppInfo("xpcshell@tests.mozilla.org", "XPCShell", "1", "1.9.2"); |
michael@0 | 11 | const profileDir = gProfD.clone(); |
michael@0 | 12 | profileDir.append("extensions"); |
michael@0 | 13 | |
michael@0 | 14 | writeInstallRDFForExtension({ |
michael@0 | 15 | id: "addon1@tests.mozilla.org", |
michael@0 | 16 | version: "1.0", |
michael@0 | 17 | optionsURL: "chrome://test/content/options.xul", |
michael@0 | 18 | aboutURL: "chrome://test/content/about.xul", |
michael@0 | 19 | iconURL: "chrome://test/skin/icon.png", |
michael@0 | 20 | icon64URL: "chrome://test/skin/icon64.png", |
michael@0 | 21 | targetApplications: [{ |
michael@0 | 22 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 23 | minVersion: "1", |
michael@0 | 24 | maxVersion: "1" |
michael@0 | 25 | }], |
michael@0 | 26 | name: "Test Addon 1", |
michael@0 | 27 | description: "Test Description", |
michael@0 | 28 | creator: "Test Creator", |
michael@0 | 29 | homepageURL: "http://www.example.com", |
michael@0 | 30 | developer: [ |
michael@0 | 31 | "Test Developer 1", |
michael@0 | 32 | "Test Developer 2" |
michael@0 | 33 | ], |
michael@0 | 34 | translator: [ |
michael@0 | 35 | "Test Translator 1", |
michael@0 | 36 | "Test Translator 2" |
michael@0 | 37 | ], |
michael@0 | 38 | contributor: [ |
michael@0 | 39 | "Test Contributor 1", |
michael@0 | 40 | "Test Contributor 2" |
michael@0 | 41 | ] |
michael@0 | 42 | }, profileDir); |
michael@0 | 43 | |
michael@0 | 44 | writeInstallRDFForExtension({ |
michael@0 | 45 | id: "addon2@tests.mozilla.org", |
michael@0 | 46 | version: "1.0", |
michael@0 | 47 | updateURL: "https://www.foo.com", |
michael@0 | 48 | targetApplications: [{ |
michael@0 | 49 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 50 | minVersion: "1", |
michael@0 | 51 | maxVersion: "1" |
michael@0 | 52 | }], |
michael@0 | 53 | name: "Test Addon 2" |
michael@0 | 54 | }, profileDir); |
michael@0 | 55 | |
michael@0 | 56 | writeInstallRDFForExtension({ |
michael@0 | 57 | id: "addon3@tests.mozilla.org", |
michael@0 | 58 | version: "1.0", |
michael@0 | 59 | updateURL: "http://www.foo.com", |
michael@0 | 60 | targetApplications: [{ |
michael@0 | 61 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 62 | minVersion: "1", |
michael@0 | 63 | maxVersion: "1" |
michael@0 | 64 | }], |
michael@0 | 65 | name: "Test Addon 3" |
michael@0 | 66 | }, profileDir); |
michael@0 | 67 | |
michael@0 | 68 | writeInstallRDFForExtension({ |
michael@0 | 69 | id: "addon4@tests.mozilla.org", |
michael@0 | 70 | version: "1.0", |
michael@0 | 71 | updateURL: "http://www.foo.com", |
michael@0 | 72 | updateKey: "foo", |
michael@0 | 73 | targetApplications: [{ |
michael@0 | 74 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 75 | minVersion: "1", |
michael@0 | 76 | maxVersion: "1" |
michael@0 | 77 | }], |
michael@0 | 78 | name: "Test Addon 4" |
michael@0 | 79 | }, profileDir); |
michael@0 | 80 | |
michael@0 | 81 | writeInstallRDFForExtension({ |
michael@0 | 82 | id: "addon5@tests.mozilla.org", |
michael@0 | 83 | version: "1.0", |
michael@0 | 84 | targetApplications: [{ |
michael@0 | 85 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 86 | minVersion: "1", |
michael@0 | 87 | maxVersion: "*" |
michael@0 | 88 | }], |
michael@0 | 89 | name: "Test Addon 5" |
michael@0 | 90 | }, profileDir); |
michael@0 | 91 | |
michael@0 | 92 | writeInstallRDFForExtension({ |
michael@0 | 93 | id: "addon6@tests.mozilla.org", |
michael@0 | 94 | version: "1.0", |
michael@0 | 95 | targetApplications: [{ |
michael@0 | 96 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 97 | minVersion: "0", |
michael@0 | 98 | maxVersion: "1" |
michael@0 | 99 | }], |
michael@0 | 100 | name: "Test Addon 6" |
michael@0 | 101 | }, profileDir); |
michael@0 | 102 | |
michael@0 | 103 | writeInstallRDFForExtension({ |
michael@0 | 104 | id: "addon7@tests.mozilla.org", |
michael@0 | 105 | version: "1.0", |
michael@0 | 106 | targetApplications: [{ |
michael@0 | 107 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 108 | minVersion: "0", |
michael@0 | 109 | maxVersion: "0" |
michael@0 | 110 | }], |
michael@0 | 111 | name: "Test Addon 7" |
michael@0 | 112 | }, profileDir); |
michael@0 | 113 | |
michael@0 | 114 | writeInstallRDFForExtension({ |
michael@0 | 115 | id: "addon8@tests.mozilla.org", |
michael@0 | 116 | version: "1.0", |
michael@0 | 117 | targetApplications: [{ |
michael@0 | 118 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 119 | minVersion: "1.1", |
michael@0 | 120 | maxVersion: "*" |
michael@0 | 121 | }], |
michael@0 | 122 | name: "Test Addon 8" |
michael@0 | 123 | }, profileDir); |
michael@0 | 124 | |
michael@0 | 125 | writeInstallRDFForExtension({ |
michael@0 | 126 | id: "addon9@tests.mozilla.org", |
michael@0 | 127 | version: "1.0", |
michael@0 | 128 | targetApplications: [{ |
michael@0 | 129 | id: "toolkit@mozilla.org", |
michael@0 | 130 | minVersion: "1.9.2", |
michael@0 | 131 | maxVersion: "1.9.*" |
michael@0 | 132 | }], |
michael@0 | 133 | name: "Test Addon 9" |
michael@0 | 134 | }, profileDir); |
michael@0 | 135 | |
michael@0 | 136 | writeInstallRDFForExtension({ |
michael@0 | 137 | id: "addon10@tests.mozilla.org", |
michael@0 | 138 | version: "1.0", |
michael@0 | 139 | targetApplications: [{ |
michael@0 | 140 | id: "toolkit@mozilla.org", |
michael@0 | 141 | minVersion: "1.9.2.1", |
michael@0 | 142 | maxVersion: "1.9.*" |
michael@0 | 143 | }], |
michael@0 | 144 | name: "Test Addon 10" |
michael@0 | 145 | }, profileDir); |
michael@0 | 146 | |
michael@0 | 147 | writeInstallRDFForExtension({ |
michael@0 | 148 | id: "addon11@tests.mozilla.org", |
michael@0 | 149 | version: "1.0", |
michael@0 | 150 | targetApplications: [{ |
michael@0 | 151 | id: "toolkit@mozilla.org", |
michael@0 | 152 | minVersion: "1.9", |
michael@0 | 153 | maxVersion: "1.9.2" |
michael@0 | 154 | }], |
michael@0 | 155 | name: "Test Addon 11" |
michael@0 | 156 | }, profileDir); |
michael@0 | 157 | |
michael@0 | 158 | writeInstallRDFForExtension({ |
michael@0 | 159 | id: "addon12@tests.mozilla.org", |
michael@0 | 160 | version: "1.0", |
michael@0 | 161 | targetApplications: [{ |
michael@0 | 162 | id: "toolkit@mozilla.org", |
michael@0 | 163 | minVersion: "1.9", |
michael@0 | 164 | maxVersion: "1.9.1.*" |
michael@0 | 165 | }], |
michael@0 | 166 | name: "Test Addon 12" |
michael@0 | 167 | }, profileDir); |
michael@0 | 168 | |
michael@0 | 169 | writeInstallRDFForExtension({ |
michael@0 | 170 | id: "addon13@tests.mozilla.org", |
michael@0 | 171 | version: "1.0", |
michael@0 | 172 | targetApplications: [{ |
michael@0 | 173 | id: "toolkit@mozilla.org", |
michael@0 | 174 | minVersion: "1.9", |
michael@0 | 175 | maxVersion: "1.9.*" |
michael@0 | 176 | }, { |
michael@0 | 177 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 178 | minVersion: "0", |
michael@0 | 179 | maxVersion: "0.5" |
michael@0 | 180 | }], |
michael@0 | 181 | name: "Test Addon 13" |
michael@0 | 182 | }, profileDir); |
michael@0 | 183 | |
michael@0 | 184 | writeInstallRDFForExtension({ |
michael@0 | 185 | id: "addon14@tests.mozilla.org", |
michael@0 | 186 | version: "1.0", |
michael@0 | 187 | targetApplications: [{ |
michael@0 | 188 | id: "toolkit@mozilla.org", |
michael@0 | 189 | minVersion: "1.9", |
michael@0 | 190 | maxVersion: "1.9.1" |
michael@0 | 191 | }, { |
michael@0 | 192 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 193 | minVersion: "1", |
michael@0 | 194 | maxVersion: "1" |
michael@0 | 195 | }], |
michael@0 | 196 | name: "Test Addon 14" |
michael@0 | 197 | }, profileDir); |
michael@0 | 198 | |
michael@0 | 199 | writeInstallRDFForExtension({ |
michael@0 | 200 | id: "addon15@tests.mozilla.org", |
michael@0 | 201 | version: "1.0", |
michael@0 | 202 | updateKey: "foo", |
michael@0 | 203 | targetApplications: [{ |
michael@0 | 204 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 205 | minVersion: "1", |
michael@0 | 206 | maxVersion: "1" |
michael@0 | 207 | }], |
michael@0 | 208 | name: "Test Addon 15" |
michael@0 | 209 | }, profileDir); |
michael@0 | 210 | |
michael@0 | 211 | writeInstallRDFForExtension({ |
michael@0 | 212 | id: "addon16@tests.mozilla.org", |
michael@0 | 213 | version: "1.0", |
michael@0 | 214 | updateKey: "foo", |
michael@0 | 215 | updateURL: "https://www.foo.com", |
michael@0 | 216 | targetApplications: [{ |
michael@0 | 217 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 218 | minVersion: "1", |
michael@0 | 219 | maxVersion: "1" |
michael@0 | 220 | }], |
michael@0 | 221 | name: "Test Addon 16" |
michael@0 | 222 | }, profileDir); |
michael@0 | 223 | |
michael@0 | 224 | writeInstallRDFForExtension({ |
michael@0 | 225 | id: "addon17@tests.mozilla.org", |
michael@0 | 226 | version: "1.0", |
michael@0 | 227 | optionsURL: "chrome://test/content/options.xul", |
michael@0 | 228 | optionsType: "2", |
michael@0 | 229 | targetApplications: [{ |
michael@0 | 230 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 231 | minVersion: "1", |
michael@0 | 232 | maxVersion: "1" |
michael@0 | 233 | }], |
michael@0 | 234 | name: "Test Addon 17" |
michael@0 | 235 | }, profileDir); |
michael@0 | 236 | |
michael@0 | 237 | writeInstallRDFForExtension({ |
michael@0 | 238 | id: "addon18@tests.mozilla.org", |
michael@0 | 239 | version: "1.0", |
michael@0 | 240 | targetApplications: [{ |
michael@0 | 241 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 242 | minVersion: "1", |
michael@0 | 243 | maxVersion: "1" |
michael@0 | 244 | }], |
michael@0 | 245 | name: "Test Addon 18" |
michael@0 | 246 | }, profileDir, null, "options.xul"); |
michael@0 | 247 | |
michael@0 | 248 | writeInstallRDFForExtension({ |
michael@0 | 249 | id: "addon19@tests.mozilla.org", |
michael@0 | 250 | version: "1.0", |
michael@0 | 251 | optionsType: "99", |
michael@0 | 252 | targetApplications: [{ |
michael@0 | 253 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 254 | minVersion: "1", |
michael@0 | 255 | maxVersion: "1" |
michael@0 | 256 | }], |
michael@0 | 257 | name: "Test Addon 19" |
michael@0 | 258 | }, profileDir); |
michael@0 | 259 | |
michael@0 | 260 | writeInstallRDFForExtension({ |
michael@0 | 261 | id: "addon20@tests.mozilla.org", |
michael@0 | 262 | version: "1.0", |
michael@0 | 263 | optionsType: "1", |
michael@0 | 264 | optionsURL: "chrome://test/content/options.xul", |
michael@0 | 265 | targetApplications: [{ |
michael@0 | 266 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 267 | minVersion: "1", |
michael@0 | 268 | maxVersion: "1" |
michael@0 | 269 | }], |
michael@0 | 270 | name: "Test Addon 20" |
michael@0 | 271 | }, profileDir); |
michael@0 | 272 | |
michael@0 | 273 | writeInstallRDFForExtension({ |
michael@0 | 274 | id: "addon21@tests.mozilla.org", |
michael@0 | 275 | version: "1.0", |
michael@0 | 276 | optionsType: "3", |
michael@0 | 277 | optionsURL: "chrome://test/content/options.xul", |
michael@0 | 278 | targetApplications: [{ |
michael@0 | 279 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 280 | minVersion: "1", |
michael@0 | 281 | maxVersion: "1" |
michael@0 | 282 | }], |
michael@0 | 283 | name: "Test Addon 21" |
michael@0 | 284 | }, profileDir); |
michael@0 | 285 | |
michael@0 | 286 | writeInstallRDFForExtension({ |
michael@0 | 287 | id: "addon22@tests.mozilla.org", |
michael@0 | 288 | version: "1.0", |
michael@0 | 289 | optionsType: "2", |
michael@0 | 290 | targetApplications: [{ |
michael@0 | 291 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 292 | minVersion: "1", |
michael@0 | 293 | maxVersion: "1" |
michael@0 | 294 | }], |
michael@0 | 295 | name: "Test Addon 22" |
michael@0 | 296 | }, profileDir); |
michael@0 | 297 | |
michael@0 | 298 | writeInstallRDFForExtension({ |
michael@0 | 299 | id: "addon23@tests.mozilla.org", |
michael@0 | 300 | version: "1.0", |
michael@0 | 301 | optionsType: "2", |
michael@0 | 302 | targetApplications: [{ |
michael@0 | 303 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 304 | minVersion: "1", |
michael@0 | 305 | maxVersion: "1" |
michael@0 | 306 | }], |
michael@0 | 307 | name: "Test Addon 23" |
michael@0 | 308 | }, profileDir, null, "options.xul"); |
michael@0 | 309 | |
michael@0 | 310 | writeInstallRDFForExtension({ |
michael@0 | 311 | id: "addon24@tests.mozilla.org", |
michael@0 | 312 | version: "1.0", |
michael@0 | 313 | targetApplications: [{ |
michael@0 | 314 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 315 | minVersion: "1", |
michael@0 | 316 | maxVersion: "1" |
michael@0 | 317 | }], |
michael@0 | 318 | name: "Test Addon 24" |
michael@0 | 319 | }, profileDir, null, "options.xul"); |
michael@0 | 320 | |
michael@0 | 321 | writeInstallRDFForExtension({ |
michael@0 | 322 | id: "addon25@tests.mozilla.org", |
michael@0 | 323 | version: "1.0", |
michael@0 | 324 | optionsType: "3", |
michael@0 | 325 | targetApplications: [{ |
michael@0 | 326 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 327 | minVersion: "1", |
michael@0 | 328 | maxVersion: "1" |
michael@0 | 329 | }], |
michael@0 | 330 | name: "Test Addon 25" |
michael@0 | 331 | }, profileDir); |
michael@0 | 332 | |
michael@0 | 333 | writeInstallRDFForExtension({ |
michael@0 | 334 | id: "addon26@tests.mozilla.org", |
michael@0 | 335 | version: "1.0", |
michael@0 | 336 | optionsType: "4", |
michael@0 | 337 | targetApplications: [{ |
michael@0 | 338 | id: "xpcshell@tests.mozilla.org", |
michael@0 | 339 | minVersion: "1", |
michael@0 | 340 | maxVersion: "1" |
michael@0 | 341 | }], |
michael@0 | 342 | name: "Test Addon 26" |
michael@0 | 343 | }, profileDir, null, "options.xul"); |
michael@0 | 344 | |
michael@0 | 345 | do_test_pending(); |
michael@0 | 346 | startupManager(); |
michael@0 | 347 | AddonManager.getAddonsByIDs(["addon1@tests.mozilla.org", |
michael@0 | 348 | "addon2@tests.mozilla.org", |
michael@0 | 349 | "addon3@tests.mozilla.org", |
michael@0 | 350 | "addon4@tests.mozilla.org", |
michael@0 | 351 | "addon5@tests.mozilla.org", |
michael@0 | 352 | "addon6@tests.mozilla.org", |
michael@0 | 353 | "addon7@tests.mozilla.org", |
michael@0 | 354 | "addon8@tests.mozilla.org", |
michael@0 | 355 | "addon9@tests.mozilla.org", |
michael@0 | 356 | "addon10@tests.mozilla.org", |
michael@0 | 357 | "addon11@tests.mozilla.org", |
michael@0 | 358 | "addon12@tests.mozilla.org", |
michael@0 | 359 | "addon13@tests.mozilla.org", |
michael@0 | 360 | "addon14@tests.mozilla.org", |
michael@0 | 361 | "addon15@tests.mozilla.org", |
michael@0 | 362 | "addon16@tests.mozilla.org", |
michael@0 | 363 | "addon17@tests.mozilla.org", |
michael@0 | 364 | "addon18@tests.mozilla.org", |
michael@0 | 365 | "addon19@tests.mozilla.org", |
michael@0 | 366 | "addon20@tests.mozilla.org", |
michael@0 | 367 | "addon21@tests.mozilla.org", |
michael@0 | 368 | "addon22@tests.mozilla.org", |
michael@0 | 369 | "addon23@tests.mozilla.org", |
michael@0 | 370 | "addon24@tests.mozilla.org", |
michael@0 | 371 | "addon25@tests.mozilla.org", |
michael@0 | 372 | "addon26@tests.mozilla.org"], |
michael@0 | 373 | function([a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, |
michael@0 | 374 | a11, a12, a13, a14, a15, a16, a17, a18, a19, a20, |
michael@0 | 375 | a21, a22, a23, a24, a25, a26]) { |
michael@0 | 376 | |
michael@0 | 377 | do_check_neq(a1, null); |
michael@0 | 378 | do_check_eq(a1.id, "addon1@tests.mozilla.org"); |
michael@0 | 379 | do_check_eq(a1.type, "extension"); |
michael@0 | 380 | do_check_eq(a1.version, "1.0"); |
michael@0 | 381 | do_check_eq(a1.optionsURL, "chrome://test/content/options.xul"); |
michael@0 | 382 | do_check_eq(a1.optionsType, AddonManager.OPTIONS_TYPE_DIALOG); |
michael@0 | 383 | do_check_eq(a1.aboutURL, "chrome://test/content/about.xul"); |
michael@0 | 384 | do_check_eq(a1.iconURL, "chrome://test/skin/icon.png"); |
michael@0 | 385 | do_check_eq(a1.icon64URL, "chrome://test/skin/icon64.png"); |
michael@0 | 386 | do_check_eq(a1.icons[32], "chrome://test/skin/icon.png"); |
michael@0 | 387 | do_check_eq(a1.icons[64], "chrome://test/skin/icon64.png"); |
michael@0 | 388 | do_check_eq(a1.name, "Test Addon 1"); |
michael@0 | 389 | do_check_eq(a1.description, "Test Description"); |
michael@0 | 390 | do_check_eq(a1.creator, "Test Creator"); |
michael@0 | 391 | do_check_eq(a1.homepageURL, "http://www.example.com"); |
michael@0 | 392 | do_check_eq(a1.developers[0], "Test Developer 1"); |
michael@0 | 393 | do_check_eq(a1.developers[1], "Test Developer 2"); |
michael@0 | 394 | do_check_eq(a1.translators[0], "Test Translator 1"); |
michael@0 | 395 | do_check_eq(a1.translators[1], "Test Translator 2"); |
michael@0 | 396 | do_check_eq(a1.contributors[0], "Test Contributor 1"); |
michael@0 | 397 | do_check_eq(a1.contributors[1], "Test Contributor 2"); |
michael@0 | 398 | do_check_true(a1.isActive); |
michael@0 | 399 | do_check_false(a1.userDisabled); |
michael@0 | 400 | do_check_false(a1.appDisabled); |
michael@0 | 401 | do_check_true(a1.isCompatible); |
michael@0 | 402 | do_check_true(a1.providesUpdatesSecurely); |
michael@0 | 403 | do_check_eq(a1.blocklistState, AM_Ci.nsIBlocklistService.STATE_NOT_BLOCKED); |
michael@0 | 404 | |
michael@0 | 405 | do_check_neq(a2, null); |
michael@0 | 406 | do_check_eq(a2.id, "addon2@tests.mozilla.org"); |
michael@0 | 407 | do_check_true(a2.isActive); |
michael@0 | 408 | do_check_false(a2.userDisabled); |
michael@0 | 409 | do_check_false(a2.appDisabled); |
michael@0 | 410 | do_check_true(a2.providesUpdatesSecurely); |
michael@0 | 411 | |
michael@0 | 412 | do_check_neq(a3, null); |
michael@0 | 413 | do_check_eq(a3.id, "addon3@tests.mozilla.org"); |
michael@0 | 414 | do_check_false(a3.isActive); |
michael@0 | 415 | do_check_false(a3.userDisabled); |
michael@0 | 416 | do_check_true(a3.appDisabled); |
michael@0 | 417 | do_check_false(a3.providesUpdatesSecurely); |
michael@0 | 418 | |
michael@0 | 419 | do_check_neq(a4, null); |
michael@0 | 420 | do_check_eq(a4.id, "addon4@tests.mozilla.org"); |
michael@0 | 421 | do_check_true(a4.isActive); |
michael@0 | 422 | do_check_false(a4.userDisabled); |
michael@0 | 423 | do_check_false(a4.appDisabled); |
michael@0 | 424 | do_check_true(a4.providesUpdatesSecurely); |
michael@0 | 425 | |
michael@0 | 426 | do_check_neq(a5, null); |
michael@0 | 427 | do_check_true(a5.isActive); |
michael@0 | 428 | do_check_false(a5.userDisabled); |
michael@0 | 429 | do_check_false(a5.appDisabled); |
michael@0 | 430 | do_check_true(a5.isCompatible); |
michael@0 | 431 | |
michael@0 | 432 | do_check_neq(a6, null); |
michael@0 | 433 | do_check_true(a6.isActive); |
michael@0 | 434 | do_check_false(a6.userDisabled); |
michael@0 | 435 | do_check_false(a6.appDisabled); |
michael@0 | 436 | do_check_true(a6.isCompatible); |
michael@0 | 437 | |
michael@0 | 438 | do_check_neq(a7, null); |
michael@0 | 439 | do_check_false(a7.isActive); |
michael@0 | 440 | do_check_false(a7.userDisabled); |
michael@0 | 441 | do_check_true(a7.appDisabled); |
michael@0 | 442 | do_check_false(a7.isCompatible); |
michael@0 | 443 | |
michael@0 | 444 | do_check_neq(a8, null); |
michael@0 | 445 | do_check_false(a8.isActive); |
michael@0 | 446 | do_check_false(a8.userDisabled); |
michael@0 | 447 | do_check_true(a8.appDisabled); |
michael@0 | 448 | do_check_false(a8.isCompatible); |
michael@0 | 449 | |
michael@0 | 450 | do_check_neq(a9, null); |
michael@0 | 451 | do_check_true(a9.isActive); |
michael@0 | 452 | do_check_false(a9.userDisabled); |
michael@0 | 453 | do_check_false(a9.appDisabled); |
michael@0 | 454 | do_check_true(a9.isCompatible); |
michael@0 | 455 | |
michael@0 | 456 | do_check_neq(a10, null); |
michael@0 | 457 | do_check_false(a10.isActive); |
michael@0 | 458 | do_check_false(a10.userDisabled); |
michael@0 | 459 | do_check_true(a10.appDisabled); |
michael@0 | 460 | do_check_false(a10.isCompatible); |
michael@0 | 461 | |
michael@0 | 462 | do_check_neq(a11, null); |
michael@0 | 463 | do_check_true(a11.isActive); |
michael@0 | 464 | do_check_false(a11.userDisabled); |
michael@0 | 465 | do_check_false(a11.appDisabled); |
michael@0 | 466 | do_check_true(a11.isCompatible); |
michael@0 | 467 | |
michael@0 | 468 | do_check_neq(a12, null); |
michael@0 | 469 | do_check_false(a12.isActive); |
michael@0 | 470 | do_check_false(a12.userDisabled); |
michael@0 | 471 | do_check_true(a12.appDisabled); |
michael@0 | 472 | do_check_false(a12.isCompatible); |
michael@0 | 473 | |
michael@0 | 474 | do_check_neq(a13, null); |
michael@0 | 475 | do_check_false(a13.isActive); |
michael@0 | 476 | do_check_false(a13.userDisabled); |
michael@0 | 477 | do_check_true(a13.appDisabled); |
michael@0 | 478 | do_check_false(a13.isCompatible); |
michael@0 | 479 | |
michael@0 | 480 | do_check_neq(a14, null); |
michael@0 | 481 | do_check_true(a14.isActive); |
michael@0 | 482 | do_check_false(a14.userDisabled); |
michael@0 | 483 | do_check_false(a14.appDisabled); |
michael@0 | 484 | do_check_true(a14.isCompatible); |
michael@0 | 485 | |
michael@0 | 486 | do_check_neq(a15, null); |
michael@0 | 487 | do_check_true(a15.isActive); |
michael@0 | 488 | do_check_false(a15.userDisabled); |
michael@0 | 489 | do_check_false(a15.appDisabled); |
michael@0 | 490 | do_check_true(a15.isCompatible); |
michael@0 | 491 | do_check_true(a15.providesUpdatesSecurely); |
michael@0 | 492 | |
michael@0 | 493 | do_check_neq(a16, null); |
michael@0 | 494 | do_check_true(a16.isActive); |
michael@0 | 495 | do_check_false(a16.userDisabled); |
michael@0 | 496 | do_check_false(a16.appDisabled); |
michael@0 | 497 | do_check_true(a16.isCompatible); |
michael@0 | 498 | do_check_true(a16.providesUpdatesSecurely); |
michael@0 | 499 | |
michael@0 | 500 | do_check_neq(a17, null); |
michael@0 | 501 | do_check_true(a17.isActive); |
michael@0 | 502 | do_check_false(a17.userDisabled); |
michael@0 | 503 | do_check_false(a17.appDisabled); |
michael@0 | 504 | do_check_true(a17.isCompatible); |
michael@0 | 505 | do_check_eq(a17.optionsURL, "chrome://test/content/options.xul"); |
michael@0 | 506 | do_check_eq(a17.optionsType, AddonManager.OPTIONS_TYPE_INLINE); |
michael@0 | 507 | |
michael@0 | 508 | do_check_neq(a18, null); |
michael@0 | 509 | do_check_true(a18.isActive); |
michael@0 | 510 | do_check_false(a18.userDisabled); |
michael@0 | 511 | do_check_false(a18.appDisabled); |
michael@0 | 512 | do_check_true(a18.isCompatible); |
michael@0 | 513 | if (Services.prefs.getBoolPref("extensions.alwaysUnpack")) { |
michael@0 | 514 | do_check_eq(a18.optionsURL, Services.io.newFileURI(profileDir).spec + |
michael@0 | 515 | "addon18@tests.mozilla.org/options.xul"); |
michael@0 | 516 | } else { |
michael@0 | 517 | do_check_eq(a18.optionsURL, "jar:" + Services.io.newFileURI(profileDir).spec + |
michael@0 | 518 | "addon18@tests.mozilla.org.xpi!/options.xul"); |
michael@0 | 519 | } |
michael@0 | 520 | do_check_eq(a18.optionsType, AddonManager.OPTIONS_TYPE_INLINE); |
michael@0 | 521 | |
michael@0 | 522 | do_check_eq(a19, null); |
michael@0 | 523 | |
michael@0 | 524 | do_check_neq(a20, null); |
michael@0 | 525 | do_check_true(a20.isActive); |
michael@0 | 526 | do_check_false(a20.userDisabled); |
michael@0 | 527 | do_check_false(a20.appDisabled); |
michael@0 | 528 | do_check_true(a20.isCompatible); |
michael@0 | 529 | do_check_eq(a20.optionsURL, "chrome://test/content/options.xul"); |
michael@0 | 530 | do_check_eq(a20.optionsType, AddonManager.OPTIONS_TYPE_DIALOG); |
michael@0 | 531 | |
michael@0 | 532 | do_check_neq(a21, null); |
michael@0 | 533 | do_check_true(a21.isActive); |
michael@0 | 534 | do_check_false(a21.userDisabled); |
michael@0 | 535 | do_check_false(a21.appDisabled); |
michael@0 | 536 | do_check_true(a21.isCompatible); |
michael@0 | 537 | do_check_eq(a21.optionsURL, "chrome://test/content/options.xul"); |
michael@0 | 538 | do_check_eq(a21.optionsType, AddonManager.OPTIONS_TYPE_TAB); |
michael@0 | 539 | |
michael@0 | 540 | do_check_neq(a22, null); |
michael@0 | 541 | do_check_eq(a22.optionsType, null); |
michael@0 | 542 | do_check_eq(a22.optionsURL, null); |
michael@0 | 543 | |
michael@0 | 544 | do_check_neq(a23, null); |
michael@0 | 545 | do_check_eq(a23.optionsType, AddonManager.OPTIONS_TYPE_INLINE); |
michael@0 | 546 | do_check_neq(a23.optionsURL, null); |
michael@0 | 547 | |
michael@0 | 548 | do_check_neq(a24, null); |
michael@0 | 549 | do_check_eq(a24.optionsType, AddonManager.OPTIONS_TYPE_INLINE); |
michael@0 | 550 | do_check_neq(a24.optionsURL, null); |
michael@0 | 551 | |
michael@0 | 552 | do_check_neq(a25, null); |
michael@0 | 553 | do_check_eq(a25.optionsType, null); |
michael@0 | 554 | do_check_eq(a25.optionsURL, null); |
michael@0 | 555 | |
michael@0 | 556 | do_check_neq(a26, null); |
michael@0 | 557 | do_check_eq(a26.optionsType, AddonManager.OPTIONS_TYPE_INLINE_INFO); |
michael@0 | 558 | do_check_neq(a26.optionsURL, null); |
michael@0 | 559 | |
michael@0 | 560 | do_execute_soon(do_test_finished); |
michael@0 | 561 | }); |
michael@0 | 562 | } |