summaryrefslogtreecommitdiffstats
path: root/toolkit/mozapps/extensions/test/xpcshell/data
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/data')
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_change.xml31
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update1.json102
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update2.json102
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update3.json102
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/app_update.xml62
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml3
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml26
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/manual_update.xml27
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/bug455906_block.xml18
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/bug455906_empty.xml7
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/bug455906_start.xml30
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/bug455906_warn.xml33
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/corrupt.xpi1
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/corruptfile.xpibin0 -> 633 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/empty.xpibin0 -> 197 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/mlbf-blocked1-unblocked2.binbin0 -> 32 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/pluginInfoURL_block.xml45
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.txt1
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.xml3
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad2.xml3
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/empty.xml5
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/good.xml11
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/missing.xml3
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/productaddons/unsigned.xpibin0 -> 452 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_signed.xpibin0 -> 4452 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_unsigned.xpibin0 -> 413 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/long.xpibin0 -> 4761 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/privileged.xpibin0 -> 4659 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed1.xpibin0 -> 4702 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed2.xpibin0 -> 4697 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/unsigned.xpibin0 -> 528 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.json134
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_empty.json7
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_fail.json1
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.json117
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_backgroundupdate.json46
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml21
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_prefs_1.xml28
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug393285.xml30
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-extensions.json336
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-plugins.json336
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app.xml333
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-extensions.json154
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-plugins.json155
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit.xml208
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug468528.xml15
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_1.xml17
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_2.xml10
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_empty.xml4
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml13
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml13
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_bug655254.json17
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_corrupt.json30
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete.json11
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete_legacy.json18
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer.json11
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer_legacy.json18
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore.json11
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore_legacy.json18
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.json352
-rwxr-xr-xtoolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.json837
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.json28
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_install_addons.json31
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_install_compat.json27
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_no_update.json7
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/ancient.xml8
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/new.xml8
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/old.xml8
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtp.xml26
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml10
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_softblocked1.xml9
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_update.json137
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_update_addons.json14
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_update_compat.json28
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/test_updatecheck.json269
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/unsigned.xpibin0 -> 463 bytes
-rw-r--r--toolkit/mozapps/extensions/test/xpcshell/data/webext-implicit-id.xpibin0 -> 4182 bytes
77 files changed, 4526 insertions, 0 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_change.xml b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_change.xml
new file mode 100644
index 0000000000..a229a653a1
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_change.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="softblock1@tests.mozilla.org">
+ <versionRange severity="1" minVersion="2" maxVersion="3"/>
+ </emItem>
+ <emItem id="softblock2@tests.mozilla.org">
+ <versionRange severity="1" minVersion="2" maxVersion="3"/>
+ </emItem>
+ <emItem id="softblock3@tests.mozilla.org">
+ <versionRange severity="1" minVersion="2" maxVersion="3"/>
+ </emItem>
+ <emItem id="softblock4@tests.mozilla.org">
+ <versionRange severity="1" minVersion="2" maxVersion="3"/>
+ </emItem>
+ <emItem id="softblock5@tests.mozilla.org">
+ <versionRange severity="1" minVersion="2" maxVersion="3"/>
+ </emItem>
+ <emItem id="hardblock@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="3"/>
+ </emItem>
+ <!-- Two RegExp matches, so test flags work - first shouldn't match. -->
+ <emItem id="/^RegExp/">
+ <versionRange severity="1" minVersion="2" maxVersion="3"/>
+ </emItem>
+ <emItem id="/^RegExp/i">
+ <versionRange severity="2" minVersion="2" maxVersion="3"/>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update1.json b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update1.json
new file mode 100644
index 0000000000..07931aec62
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update1.json
@@ -0,0 +1,102 @@
+{
+ "addons": {
+ "softblock1@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_soft1_2.xpi"
+ }
+ ]
+ },
+ "softblock3@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_soft3_2.xpi"
+ }
+ ]
+ },
+ "softblock5@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_soft5_2.xpi"
+ }
+ ]
+ },
+ "softblock4@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_soft4_2.xpi"
+ }
+ ]
+ },
+ "softblock2@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_soft2_2.xpi"
+ }
+ ]
+ },
+ "regexpblock@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_regexp1_2.xpi"
+ }
+ ]
+ },
+ "hardblock@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/addons/blocklist_hard1_2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update2.json b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update2.json
new file mode 100644
index 0000000000..cc9c38e4b1
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update2.json
@@ -0,0 +1,102 @@
+{
+ "addons": {
+ "softblock1@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_soft1_3.xpi"
+ }
+ ]
+ },
+ "softblock3@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_soft3_3.xpi"
+ }
+ ]
+ },
+ "regexpblock@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_regexp1_3.xpi"
+ }
+ ]
+ },
+ "hardblock@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_hard1_3.xpi"
+ }
+ ]
+ },
+ "softblock5@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_soft5_3.xpi"
+ }
+ ]
+ },
+ "softblock4@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_soft4_3.xpi"
+ }
+ ]
+ },
+ "softblock2@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "3",
+ "update_link": "http://example.com/addons/blocklist_soft2_3.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update3.json b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update3.json
new file mode 100644
index 0000000000..d60db0f036
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/addon_update3.json
@@ -0,0 +1,102 @@
+{
+ "addons": {
+ "regexpblock@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_regexp_1.xpi"
+ }
+ ]
+ },
+ "hardblock@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_hard_1.xpi"
+ }
+ ]
+ },
+ "softblock5@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_soft5_1.xpi"
+ }
+ ]
+ },
+ "softblock4@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_soft4_1.xpi"
+ }
+ ]
+ },
+ "softblock3@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_soft3_1.xpi"
+ }
+ ]
+ },
+ "softblock2@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_soft2_1.xpi"
+ }
+ ]
+ },
+ "softblock1@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "*"
+ }
+ },
+ "version": "4",
+ "update_link": "http://example.com/addons/blocklist_soft1_1.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/app_update.xml b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/app_update.xml
new file mode 100644
index 0000000000..85a66fe555
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/app_update.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="softblock1@tests.mozilla.org">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="softblock2@tests.mozilla.org">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="softblock3@tests.mozilla.org">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="softblock4@tests.mozilla.org">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="softblock5@tests.mozilla.org">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="hardblock@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="/^RegExp/">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="/^RegExp/i">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml
new file mode 100644
index 0000000000..87011cd398
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist"/>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml
new file mode 100644
index 0000000000..867a34255b
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="softblock1@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="softblock2@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="softblock3@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="softblock4@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="softblock5@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="hardblock@tests.mozilla.org"/>
+ <emItem id="/^RegExp/">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="/^RegExp/i"/>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/manual_update.xml b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/manual_update.xml
new file mode 100644
index 0000000000..df9276525b
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/blocklistchange/manual_update.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="softblock1@tests.mozilla.org">
+ <versionRange severity="1" minVersion="1" maxVersion="2"/>
+ </emItem>
+ <emItem id="softblock2@tests.mozilla.org">
+ <versionRange severity="1" minVersion="1" maxVersion="2"/>
+ </emItem>
+ <emItem id="softblock3@tests.mozilla.org">
+ <versionRange severity="1" minVersion="1" maxVersion="2"/>
+ </emItem>
+ <emItem id="softblock4@tests.mozilla.org">
+ <versionRange severity="1" minVersion="1" maxVersion="2"/>
+ </emItem>
+ <emItem id="softblock5@tests.mozilla.org">
+ <versionRange severity="1" minVersion="1" maxVersion="2"/>
+ </emItem>
+ <emItem id="hardblock@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="2"/>
+ </emItem>
+ <emItem id="/^RegExp/i">
+ <versionRange minVersion="1" maxVersion="2"/>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_block.xml b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_block.xml
new file mode 100644
index 0000000000..1f673ef2fb
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_block.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="test_bug455906_1@tests.mozilla.org" blockID="test_bug455906_1@tests.mozilla.org"/>
+ <emItem id="test_bug455906_2@tests.mozilla.org" blockID="test_bug455906_2@tests.mozilla.org"/>
+ <emItem id="test_bug455906_3@tests.mozilla.org" blockID="test_bug455906_3@tests.mozilla.org"/>
+ <emItem id="test_bug455906_4@tests.mozilla.org" blockID="test_bug455906_4@tests.mozilla.org"/>
+ <emItem id="test_bug455906_5@tests.mozilla.org" blockID="test_bug455906_5@tests.mozilla.org"/>
+ <emItem id="test_bug455906_6@tests.mozilla.org" blockID="test_bug455906_6@tests.mozilla.org"/>
+ <emItem id="test_bug455906_7@tests.mozilla.org" blockID="test_bug455906_7@tests.mozilla.org"/>
+ </emItems>
+ <pluginItems>
+ <pluginItem blockID="test_bug455906_plugin">
+ <match name="name" exp="^test_bug455906"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_empty.xml b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_empty.xml
new file mode 100644
index 0000000000..88d22f281f
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_empty.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="dummy_bug455906_2@tests.mozilla.org"/>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_start.xml b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_start.xml
new file mode 100644
index 0000000000..daba6f4c1c
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_start.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="test_bug455906_4@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_5@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ <emItem id="test_bug455906_6@tests.mozilla.org">
+ <versionRange severity="2"/>
+ </emItem>
+ <emItem id="dummy_bug455906_1@tests.mozilla.org"/>
+ </emItems>
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="^test_bug455906_4$"/>
+ <versionRange severity="0"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug455906_5$"/>
+ <versionRange severity="1"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug455906_6$"/>
+ <versionRange severity="2"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_warn.xml b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_warn.xml
new file mode 100644
index 0000000000..232fd0d079
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/bug455906_warn.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="test_bug455906_1@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_2@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_3@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_4@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_5@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_6@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ <emItem id="test_bug455906_7@tests.mozilla.org">
+ <versionRange severity="-1"/>
+ </emItem>
+ </emItems>
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="^test_bug455906"/>
+ <versionRange severity="-1"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/corrupt.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/corrupt.xpi
new file mode 100644
index 0000000000..35d7bd5e5d
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/corrupt.xpi
@@ -0,0 +1 @@
+This is a corrupt zip file
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/corruptfile.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/corruptfile.xpi
new file mode 100644
index 0000000000..0c30989aa5
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/corruptfile.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/empty.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/empty.xpi
new file mode 100644
index 0000000000..74ed2b8174
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/empty.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/mlbf-blocked1-unblocked2.bin b/toolkit/mozapps/extensions/test/xpcshell/data/mlbf-blocked1-unblocked2.bin
new file mode 100644
index 0000000000..fe8e08fa68
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/mlbf-blocked1-unblocked2.bin
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/pluginInfoURL_block.xml b/toolkit/mozapps/extensions/test/xpcshell/data/pluginInfoURL_block.xml
new file mode 100644
index 0000000000..75e252a46b
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/pluginInfoURL_block.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ </emItems>
+ <pluginItems>
+ <pluginItem blockID="test_plugin_wInfoURL">
+ <match name="name" exp="^test_with_infoURL"/>
+ <match name="version" exp="^5"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="*"/>
+ </targetApplication>
+ </versionRange>
+ <infoURL>http://test.url.com/</infoURL>
+ </pluginItem>
+ <pluginItem blockID="test_plugin_wAltInfoURL">
+ <match name="name" exp="^test_with_altInfoURL"/>
+ <match name="version" exp="^5"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="*"/>
+ </targetApplication>
+ </versionRange>
+ <infoURL>http://alt.test.url.com/</infoURL>
+ </pluginItem>
+ <pluginItem blockID="test_plugin_noInfoURL">
+ <match name="name" exp="^test_no_infoURL"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="*"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem blockID="test_plugin_newVersion">
+ <match name="name" exp="^test_newVersion"/>
+ <infoURL>http://test.url2.com/</infoURL>
+ <versionRange minVersion="1" maxVersion="2">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="*"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.txt b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.txt
new file mode 100644
index 0000000000..f17f98b15b
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.txt
@@ -0,0 +1 @@
+Not an xml file! \ No newline at end of file
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.xml b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.xml
new file mode 100644
index 0000000000..0e3d415c44
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<foobar></barfoo> \ No newline at end of file
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad2.xml b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad2.xml
new file mode 100644
index 0000000000..55ad1c7d55
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/bad2.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<test></test>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/empty.xml b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/empty.xml
new file mode 100644
index 0000000000..42cb20bd01
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/empty.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<updates>
+ <addons></addons>
+</updates>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/good.xml b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/good.xml
new file mode 100644
index 0000000000..e1da86fa54
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/good.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<updates>
+ <addons>
+ <addon id="test1" URL="http://example.com/test1.xpi"/>
+ <addon id="test2" URL="http://example.com/test2.xpi" hashFunction="md5" hashValue="djhfgsjdhf"/>
+ <addon id="test3" URL="http://example.com/test3.xpi" version="1.0" size="45"/>
+ <addon id="test4"/>
+ <addon URL="http://example.com/test5.xpi"/>
+ </addons>
+</updates>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/missing.xml b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/missing.xml
new file mode 100644
index 0000000000..8c9501478e
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/missing.xml
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<updates></updates>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/unsigned.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/unsigned.xpi
new file mode 100644
index 0000000000..51b00475a9
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/productaddons/unsigned.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_signed.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_signed.xpi
new file mode 100644
index 0000000000..f60d00348e
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_signed.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_unsigned.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_unsigned.xpi
new file mode 100644
index 0000000000..89de7f4409
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/langpack_unsigned.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/long.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/long.xpi
new file mode 100644
index 0000000000..f95f3df91e
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/long.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/privileged.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/privileged.xpi
new file mode 100644
index 0000000000..c22acaacd2
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/privileged.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed1.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed1.xpi
new file mode 100644
index 0000000000..e2ba7d6fd8
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed1.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed2.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed2.xpi
new file mode 100644
index 0000000000..ccb20796f2
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/signed2.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/unsigned.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/unsigned.xpi
new file mode 100644
index 0000000000..9e10be5db3
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/signing_checks/unsigned.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.json
new file mode 100644
index 0000000000..1be2be912c
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_cache.json
@@ -0,0 +1,134 @@
+{
+ "page_size": 25,
+ "page_count": 1,
+ "count": 4,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "name": "Repo Add-on 1",
+ "type": "extension",
+ "guid": "test_AddonRepository_1@tests.mozilla.org",
+ "current_version": {
+ "version": "2.1",
+ "files": [
+ {
+ "platform": "all",
+ "size": 9,
+ "url": "http://example.com/repo/1/install.xpi"
+ }
+ ]
+ },
+ "authors": [
+ {
+ "name": "Repo Add-on 1 - Creator",
+ "url": "http://example.com/repo/1/creator.html"
+ },
+ {
+ "name": "Repo Add-on 1 - First Developer",
+ "url": "http://example.com/repo/1/firstDeveloper.html"
+ },
+ {
+ "name": "Repo Add-on 1 - Second Developer",
+ "url": "http://example.com/repo/1/secondDeveloper.html"
+ }
+ ],
+ "summary": "Repo Add-on 1 - Description<br>Second line",
+ "description": "<p>Repo Add-on 1 - Full Description &amp; some extra</p>",
+ "icons": {
+ "32": "http://example.com/repo/1/icon.png"
+ },
+ "ratings": {
+ "count": 1234,
+ "text_count": 1111,
+ "average": 1
+ },
+ "homepage": "http://example.com/repo/1/homepage.html",
+ "support_url": "http://example.com/repo/1/support.html",
+ "contributions_url": "http://example.com/repo/1/meetDevelopers.html",
+ "ratings_url": "http://example.com/repo/1/review.html",
+ "weekly_downloads": 3331,
+ "last_updated": "1970-01-01T00:00:09Z"
+ },
+ {
+ "name": "Repo Add-on 2",
+ "type": "theme",
+ "guid": "test_AddonRepository_2@tests.mozilla.org",
+ "current_version": {
+ "version": "2.2",
+ "files": [
+ {
+ "platform": "all",
+ "size": 9,
+ "url": "http://example.com/repo/2/install.xpi"
+ }
+ ]
+ },
+ "authors": [
+ {
+ "name": "Repo Add-on 2 - Creator",
+ "url": "http://example.com/repo/2/creator.html"
+ },
+ {
+ "name": "Repo Add-on 2 - First Developer",
+ "url": "http://example.com/repo/2/firstDeveloper.html"
+ },
+ {
+ "name": "Repo Add-on 2 - Second Developer",
+ "url": "http://example.com/repo/2/secondDeveloper.html"
+ }
+ ],
+ "summary": "Repo Add-on 2 - Description",
+ "description": "Repo Add-on 2 - Full Description",
+ "icons": {
+ "32": "http://example.com/repo/2/icon.png"
+ },
+ "previews": [
+ {
+ "image_url": "http://example.com/repo/2/firstFull.png",
+ "thumbnail_url": "http://example.com/repo/2/firstThumbnail.png",
+ "caption": "Repo Add-on 2 - First Caption"
+ },
+ {
+ "image_url": "http://example.com/repo/2/secondFull.png",
+ "thumbnail_url": "http://example.com/repo/2/secondThumbnail.png",
+ "caption": "Repo Add-on 2 - Second Caption"
+ }
+ ],
+ "ratings": {
+ "count": 2223,
+ "text_count": 1112,
+ "average": 2
+ },
+ "homepage": "http://example.com/repo/2/homepage.html",
+ "support_url": "http://example.com/repo/2/support.html",
+ "contributions_url": "http://example.com/repo/2/meetDevelopers.html",
+ "ratings_url": "http://example.com/repo/2/review.html",
+ "weekly_downloads": 3332,
+ "last_updated": "1970-01-01T00:00:09Z"
+ },
+ {
+ "name": "Repo Add-on 3",
+ "type": "theme",
+ "guid": "test_AddonRepository_3@tests.mozilla.org",
+ "current_version": {
+ "version": "2.3"
+ },
+ "icons": {
+ "32": "http://example.com/repo/3/icon.png"
+ },
+ "previews": [
+ {
+ "image_url": "http://example.com/repo/3/firstFull.png",
+ "thumbnail_url": "http://example.com/repo/3/firstThumbnail.png",
+ "caption": "Repo Add-on 3 - First Caption"
+ },
+ {
+ "image_url": "http://example.com/repo/3/secondFull.png",
+ "thumbnail_url": "http://example.com/repo/3/secondThumbnail.png",
+ "caption": "Repo Add-on 3 - Second Caption"
+ }
+ ]
+ }
+ ]
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_empty.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_empty.json
new file mode 100644
index 0000000000..64fac5dc8b
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_empty.json
@@ -0,0 +1,7 @@
+{
+ "page_size": 25,
+ "count": 0,
+ "next": null,
+ "previous": null,
+ "results": []
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_fail.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_fail.json
new file mode 100644
index 0000000000..d29d525a81
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_fail.json
@@ -0,0 +1 @@
+this should yield a json parse error
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.json
new file mode 100644
index 0000000000..13850331f6
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.json
@@ -0,0 +1,117 @@
+{
+ "page_size": 25,
+ "page_count": 1,
+ "count": 4,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "name": "PASS",
+ "type": "extension",
+ "guid": "test1@tests.mozilla.org",
+ "current_version": {
+ "version": "1.1",
+ "files": [
+ {
+ "platform": "all",
+ "url": "http://example.com/addons/test_AddonRepository_2.xpi",
+ "size": 5555
+ }
+ ]
+ },
+ "authors": [
+ {
+ "name": "Test Creator 1",
+ "url": "http://example.com/creator1.html"
+ },
+ {
+ "name": "Test Developer 1",
+ "url": "http://example.com/developer1.html"
+ }
+ ],
+ "summary": "Test Summary 1",
+ "description": "Test Description 1",
+ "icons": {
+ "32": "http://example.com/icon1.png"
+ },
+ "previews": [
+ {
+ "caption": "Caption 1 - 1",
+ "image_size": [400, 300],
+ "image_url": "http://example.com/full1-1.png",
+ "thumbnail_size": [200, 150],
+ "thumbnail_url": "http://example.com/thumbnail1-1.png"
+ },
+ {
+ "caption": "Caption 2 - 1",
+ "image_url": "http://example.com/full2-1.png",
+ "thumbnail_url": "http://example.com/thumbnail2-1.png"
+ }
+ ],
+ "ratings": {
+ "count": 1234,
+ "text_count": 1111,
+ "average": 4
+ },
+ "ratings_url": "http://example.com/review1.html",
+ "support_url": "http://example.com/support1.html",
+ "contributions_url": "http://example.com/contribution1.html",
+ "weekly_downloads": 3333,
+ "last_updated": "2010-02-01T14:04:05Z"
+ },
+ {
+ "name": "PASS",
+ "type": "extension",
+ "guid": "test2@tests.mozilla.org",
+ "current_version": {
+ "version": "2.0",
+ "files": [
+ {
+ "platform": "XPCShell",
+ "url": "http://example.com/addons/bleah.xpi",
+ "size": 1000
+ }
+ ]
+ }
+ },
+ {
+ "name": "FAIL",
+ "type": "extension",
+ "guid": "notRequested@tests.mozilla.org",
+ "current_version": {
+ "version": "1.3",
+ "files": [
+ {
+ "platform": "all",
+ "url": "http://example.com/test3.xpi"
+ }
+ ]
+ },
+ "authors": [
+ {
+ "name": "Test Creator 3"
+ }
+ ],
+ "summary": "Add-on with a guid that wasn't requested should be ignored."
+ },
+ {
+ "name": "PASS",
+ "type": "theme",
+ "guid": "test_AddonRepository_1@tests.mozilla.org",
+ "current_version": {
+ "version": "1.4",
+ "files": [
+ {
+ "platform": "UNKNOWN1",
+ "url": "http://example.com/test4.xpi"
+ },
+ {
+ "platform": "UNKNOWN2",
+ "url": "http://example.com/test4.xpi"
+ }
+ ]
+ }
+ }
+ ]
+}
+
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_backgroundupdate.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_backgroundupdate.json
new file mode 100644
index 0000000000..b83e0b04ba
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_backgroundupdate.json
@@ -0,0 +1,46 @@
+{
+ "addons": {
+ "addon2@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/broken.xpi"
+ }
+ ]
+ },
+ "addon3@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/broken.xpi"
+ }
+ ]
+ },
+ "addon1@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ },
+ "version": "2",
+ "update_link": "http://example.com/broken.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml
new file mode 100644
index 0000000000..b092418bbb
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem name="/^Mozilla Corp\.$/">
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="/block2/" name="/^Moz/"
+ homepageURL="/\.dangerous\.com/" updateURL="/\.dangerous\.com/">
+ <versionRange severity="3">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_prefs_1.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_prefs_1.xml
new file mode 100644
index 0000000000..41df457b05
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_blocklist_prefs_1.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="block1@tests.mozilla.org">
+ <prefs>
+ <pref>test.blocklist.pref1</pref>
+ <pref>test.blocklist.pref2</pref>
+ </prefs>
+ <versionRange severity="1">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="block2@tests.mozilla.org">
+ <prefs>
+ <pref>test.blocklist.pref3</pref>
+ <pref>test.blocklist.pref4</pref>
+ </prefs>
+ <versionRange severity="3">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="2.*"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug393285.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug393285.xml
new file mode 100644
index 0000000000..1767b4332f
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug393285.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="test_bug393285_2@tests.mozilla.org"/>
+ <emItem id="test_bug393285_3a@tests.mozilla.org">
+ <versionRange minVersion="1.0" maxVersion="1.0"/>
+ </emItem>
+ <emItem id="test_bug393285_3b@tests.mozilla.org">
+ <versionRange minVersion="1.0" maxVersion="1.0"/>
+ </emItem>
+ <emItem id="test_bug393285_4@tests.mozilla.org">
+ <versionRange minVersion="1.0" maxVersion="1.0">
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1.0" maxVersion="1.0"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug393285_5@tests.mozilla.org" os="Darwin"/>
+ <emItem id="test_bug393285_6@tests.mozilla.org" os="XPCShell"/>
+ <emItem id="test_bug393285_7@tests.mozilla.org" os="Darwin,XPCShell,WINNT"/>
+ <emItem id="test_bug393285_8@tests.mozilla.org" xpcomabi="x86-msvc"/>
+ <emItem id="test_bug393285_9@tests.mozilla.org" xpcomabi="noarch-spidermonkey"/>
+ <emItem id="test_bug393285_10@tests.mozilla.org" xpcomabi="ppc-gcc3,noarch-spidermonkey,x86-msvc"/>
+ <emItem id="test_bug393285_11@tests.mozilla.org" os="Darwin" xpcomabi="ppc-gcc3,x86-msvc"/>
+ <emItem id="test_bug393285_12@tests.mozilla.org" os="Darwin" xpcomabi="ppc-gcc3,noarch-spidermonkey,x86-msvc"/>
+ <emItem id="test_bug393285_13@tests.mozilla.org" os="XPCShell" xpcomabi="ppc-gcc3,x86-msvc"/>
+ <emItem id="test_bug393285_14@tests.mozilla.org" os="XPCShell,WINNT" xpcomabi="ppc-gcc3,x86-msvc,noarch-spidermonkey"/>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-extensions.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-extensions.json
new file mode 100644
index 0000000000..c11b41f4ae
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-extensions.json
@@ -0,0 +1,336 @@
+[
+ {
+ "_comment": "Always blocked",
+ "guid": "test_bug449027_2@tests.mozilla.org",
+ "versionRange": []
+ },
+ {
+ "_comment": "Always blocked",
+ "guid": "test_bug449027_3@tests.mozilla.org",
+ "versionRange": [
+ {}
+ ]
+ },
+ {
+ "_comment": "Not blocked since neither version range matches",
+ "guid": "test_bug449027_4@tests.mozilla.org",
+ "versionRange": [
+ {
+ "minVersion": "6"
+ },
+ {
+ "maxVersion": "4"
+ }
+ ]
+ },
+ {
+ "_comment": "Invalid version range, should not block",
+ "guid": "test_bug449027_5@tests.mozilla.org",
+ "versionRange": [
+ {
+ "maxVersion": "4",
+ "minVersion": "6"
+ }
+ ]
+ },
+ {
+ "_comment": "Should block all of these",
+ "guid": "test_bug449027_6@tests.mozilla.org",
+ "versionRange": [
+ {
+ "maxVersion": "8",
+ "minVersion": "7"
+ },
+ {
+ "maxVersion": "6",
+ "minVersion": "5"
+ },
+ {
+ "maxVersion": "4"
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_7@tests.mozilla.org",
+ "versionRange": [
+ {
+ "maxVersion": "4"
+ },
+ {
+ "maxVersion": "5",
+ "minVersion": "4"
+ },
+ {
+ "maxVersion": "7",
+ "minVersion": "6"
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_8@tests.mozilla.org",
+ "versionRange": [
+ {
+ "maxVersion": "2",
+ "minVersion": "2"
+ },
+ {
+ "maxVersion": "6",
+ "minVersion": "4"
+ },
+ {
+ "maxVersion": "8",
+ "minVersion": "7"
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_9@tests.mozilla.org",
+ "versionRange": [
+ {
+ "minVersion": "4"
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_10@tests.mozilla.org",
+ "versionRange": [
+ {
+ "minVersion": "5"
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_11@tests.mozilla.org",
+ "versionRange": [
+ {
+ "maxVersion": "6"
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_12@tests.mozilla.org",
+ "versionRange": [
+ {
+ "maxVersion": "5"
+ }
+ ]
+ },
+ {
+ "_comment": "This should block all versions for any application",
+ "guid": "test_bug449027_13@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {}
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Shouldn't block",
+ "guid": "test_bug449027_14@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Should block for any version of the app",
+ "guid": "test_bug449027_15@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Should still block",
+ "guid": "test_bug449027_16@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Not blocked since neither version range matches",
+ "guid": "test_bug449027_17@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "minVersion": "4"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Invalid version range, should not block",
+ "guid": "test_bug449027_18@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4",
+ "minVersion": "6"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Should block all of these",
+ "guid": "test_bug449027_19@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "6",
+ "minVersion": "5"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4",
+ "minVersion": "3"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_20@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "2"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "3",
+ "minVersion": "2"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "5",
+ "minVersion": "4"
+ },
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_21@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "1",
+ "minVersion": "1"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4",
+ "minVersion": "2"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "6",
+ "minVersion": "5"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_22@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "minVersion": "3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_23@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "minVersion": "2"
+ },
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_24@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "guid": "test_bug449027_25@tests.mozilla.org",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4"
+ }
+ ]
+ }
+ ]
+ }
+] \ No newline at end of file
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-plugins.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-plugins.json
new file mode 100644
index 0000000000..45ab8f6c52
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app-plugins.json
@@ -0,0 +1,336 @@
+[
+ {
+ "_comment": "Always blocked",
+ "matchName": "^test_bug449027_2$",
+ "versionRange": []
+ },
+ {
+ "_comment": "Always blocked",
+ "matchName": "^test_bug449027_3$",
+ "versionRange": [
+ {}
+ ]
+ },
+ {
+ "_comment": "Not blocked since neither version range matches",
+ "matchName": "^test_bug449027_4$",
+ "versionRange": [
+ {
+ "minVersion": "6"
+ },
+ {
+ "maxVersion": "4"
+ }
+ ]
+ },
+ {
+ "_comment": "Invalid version range, should not block",
+ "matchName": "^test_bug449027_5$",
+ "versionRange": [
+ {
+ "maxVersion": "4",
+ "minVersion": "6"
+ }
+ ]
+ },
+ {
+ "_comment": "Should block all of these",
+ "matchName": "^test_bug449027_6$",
+ "versionRange": [
+ {
+ "maxVersion": "8",
+ "minVersion": "7"
+ },
+ {
+ "maxVersion": "6",
+ "minVersion": "5"
+ },
+ {
+ "maxVersion": "4"
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_7$",
+ "versionRange": [
+ {
+ "maxVersion": "4"
+ },
+ {
+ "maxVersion": "5",
+ "minVersion": "4"
+ },
+ {
+ "maxVersion": "7",
+ "minVersion": "6"
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_8$",
+ "versionRange": [
+ {
+ "maxVersion": "2",
+ "minVersion": "2"
+ },
+ {
+ "maxVersion": "6",
+ "minVersion": "4"
+ },
+ {
+ "maxVersion": "8",
+ "minVersion": "7"
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_9$",
+ "versionRange": [
+ {
+ "minVersion": "4"
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_10$",
+ "versionRange": [
+ {
+ "minVersion": "5"
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_11$",
+ "versionRange": [
+ {
+ "maxVersion": "6"
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_12$",
+ "versionRange": [
+ {
+ "maxVersion": "5"
+ }
+ ]
+ },
+ {
+ "_comment": "This should block all versions for any application",
+ "matchName": "^test_bug449027_13$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {}
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Shouldn't block",
+ "matchName": "^test_bug449027_14$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Should block for any version of the app",
+ "matchName": "^test_bug449027_15$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Should still block",
+ "matchName": "^test_bug449027_16$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Not blocked since neither version range matches",
+ "matchName": "^test_bug449027_17$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "minVersion": "4"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Invalid version range, should not block",
+ "matchName": "^test_bug449027_18$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4",
+ "minVersion": "6"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "_comment": "Should block all of these",
+ "matchName": "^test_bug449027_19$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "6",
+ "minVersion": "5"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4",
+ "minVersion": "3"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "2"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_20$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "2"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "3",
+ "minVersion": "2"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "5",
+ "minVersion": "4"
+ },
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_21$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "1",
+ "minVersion": "1"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4",
+ "minVersion": "2"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "6",
+ "minVersion": "5"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_22$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "minVersion": "3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_23$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "minVersion": "2"
+ },
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_24$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "3"
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "matchName": "^test_bug449027_25$",
+ "versionRange": [
+ {
+ "targetApplication": [
+ {
+ "guid": "xpcshell@tests.mozilla.org",
+ "maxVersion": "4"
+ }
+ ]
+ }
+ ]
+ }
+] \ No newline at end of file
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app.xml
new file mode 100644
index 0000000000..f12ca1fa6d
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_app.xml
@@ -0,0 +1,333 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <!-- All extensions are version 5 and tests run against appVersion 3 -->
+
+ <!-- Test 1 not listed, should never get blocked -->
+ <!-- Always blocked -->
+ <emItem id="test_bug449027_2@tests.mozilla.org"/>
+ <!-- Always blocked -->
+ <emItem id="test_bug449027_3@tests.mozilla.org">
+ <versionRange/>
+ </emItem>
+ <!-- Not blocked since neither version range matches -->
+ <emItem id="test_bug449027_4@tests.mozilla.org">
+ <versionRange minVersion="6"/>
+ <versionRange maxVersion="4"/>
+ </emItem>
+ <!-- Invalid version range, should not block -->
+ <emItem id="test_bug449027_5@tests.mozilla.org">
+ <versionRange minVersion="6" maxVersion="4"/>
+ </emItem>
+ <!-- Should block all of these -->
+ <emItem id="test_bug449027_6@tests.mozilla.org">
+ <versionRange minVersion="7" maxVersion="8"/>
+ <versionRange minVersion="5" maxVersion="6"/>
+ <versionRange maxVersion="4"/>
+ </emItem>
+ <emItem id="test_bug449027_7@tests.mozilla.org">
+ <versionRange maxVersion="4"/>
+ <versionRange minVersion="4" maxVersion="5"/>
+ <versionRange minVersion="6" maxVersion="7"/>
+ </emItem>
+ <emItem id="test_bug449027_8@tests.mozilla.org">
+ <versionRange minVersion="2" maxVersion="2"/>
+ <versionRange minVersion="4" maxVersion="6"/>
+ <versionRange minVersion="7" maxVersion="8"/>
+ </emItem>
+ <emItem id="test_bug449027_9@tests.mozilla.org">
+ <versionRange minVersion="4"/>
+ </emItem>
+ <emItem id="test_bug449027_10@tests.mozilla.org">
+ <versionRange minVersion="5"/>
+ </emItem>
+ <emItem id="test_bug449027_11@tests.mozilla.org">
+ <versionRange maxVersion="6"/>
+ </emItem>
+ <emItem id="test_bug449027_12@tests.mozilla.org">
+ <versionRange maxVersion="5"/>
+ </emItem>
+
+ <!-- This should block all versions for any application -->
+ <emItem id="test_bug449027_13@tests.mozilla.org">
+ <versionRange>
+ <targetApplication/>
+ </versionRange>
+ </emItem>
+ <!-- Shouldn't block -->
+ <emItem id="test_bug449027_14@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </emItem>
+ <!-- Should block for any version of the app -->
+ <emItem id="test_bug449027_15@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org"/>
+ </versionRange>
+ </emItem>
+ <!-- Should still block -->
+ <emItem id="test_bug449027_16@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <!-- Not blocked since neither version range matches -->
+ <emItem id="test_bug449027_17@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="4"/>
+ <versionRange maxVersion="2"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <!-- Invalid version range, should not block -->
+ <emItem id="test_bug449027_18@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="6" maxVersion="4"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <!-- Should block all of these -->
+ <emItem id="test_bug449027_19@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="5" maxVersion="6"/>
+ <versionRange minVersion="3" maxVersion="4"/>
+ <versionRange maxVersion="2"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_20@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange maxVersion="2"/>
+ <versionRange minVersion="2" maxVersion="3"/>
+ <versionRange minVersion="4" maxVersion="5"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_21@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="1"/>
+ <versionRange minVersion="2" maxVersion="4"/>
+ <versionRange minVersion="5" maxVersion="6"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_22@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="3"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_23@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_24@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange maxVersion="3"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_25@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange maxVersion="4"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ </emItems>
+ <pluginItems>
+ <!-- All plugins are version 5 and tests run against appVersion 3 -->
+
+ <!-- Test 1 not listed, should never get blocked -->
+ <!-- Always blocked -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_2$"/>
+ </pluginItem>
+ <!-- Always blocked -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_3$"/>
+ <versionRange/>
+ </pluginItem>
+ <!-- Not blocked since neither version range matches -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_4$"/>
+ <versionRange minVersion="6"/>
+ <versionRange maxVersion="4"/>
+ </pluginItem>
+ <!-- Invalid version range, should not block -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_5$"/>
+ <versionRange minVersion="6" maxVersion="4"/>
+ </pluginItem>
+ <!-- Should block all of these -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_6$"/>
+ <versionRange minVersion="7" maxVersion="8"/>
+ <versionRange minVersion="5" maxVersion="6"/>
+ <versionRange maxVersion="4"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_7$"/>
+ <versionRange maxVersion="4"/>
+ <versionRange minVersion="4" maxVersion="5"/>
+ <versionRange minVersion="6" maxVersion="7"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_8$"/>
+ <versionRange minVersion="2" maxVersion="2"/>
+ <versionRange minVersion="4" maxVersion="6"/>
+ <versionRange minVersion="7" maxVersion="8"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_9$"/>
+ <versionRange minVersion="4"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_10$"/>
+ <versionRange minVersion="5"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_11$"/>
+ <versionRange maxVersion="6"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_12$"/>
+ <versionRange maxVersion="5"/>
+ </pluginItem>
+
+ <!-- This should block all versions for any application -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_13$"/>
+ <versionRange>
+ <targetApplication/>
+ </versionRange>
+ </pluginItem>
+ <!-- Shouldn't block -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_14$"/>
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </pluginItem>
+ <!-- Should block for any version of the app -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_15$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org"/>
+ </versionRange>
+ </pluginItem>
+ <!-- Should still block -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_16$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <!-- Not blocked since neither version range matches -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_17$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="4"/>
+ <versionRange maxVersion="2"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <!-- Invalid version range, should not block -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_18$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="6" maxVersion="4"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <!-- Should block all of these -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_19$"/>
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="5" maxVersion="6"/>
+ <versionRange minVersion="3" maxVersion="4"/>
+ <versionRange maxVersion="2"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_20$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange maxVersion="2"/>
+ <versionRange minVersion="2" maxVersion="3"/>
+ <versionRange minVersion="4" maxVersion="5"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_21$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="1" maxVersion="1"/>
+ <versionRange minVersion="2" maxVersion="4"/>
+ <versionRange minVersion="5" maxVersion="6"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_22$"/>
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="3"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_23$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange minVersion="2"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_24$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange maxVersion="3"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_25$"/>
+ <versionRange>
+ <targetApplication id="xpcshell@tests.mozilla.org">
+ <versionRange maxVersion="4"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-extensions.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-extensions.json
new file mode 100644
index 0000000000..704a84ace9
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-extensions.json
@@ -0,0 +1,154 @@
+[
+ {
+ "_general_comment": "All extensions are version 5 and tests run against toolkitVersion 8",
+ "_general_comment2": "Test 1-14 not listed, should never get blocked",
+
+ "_comment": "Should block for any version of the app",
+ "guid": "test_bug449027_15@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{"guid": "toolkit@mozilla.org"}]
+ }]
+ },
+ {
+ "_comment": "Should still block",
+ "guid": "test_bug449027_16@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{"guid": "toolkit@mozilla.org"}]
+ }]
+ },
+ {
+ "_comment": "Not blocked since neither version range matches",
+ "guid": "test_bug449027_17@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{
+ "minVersion": "9",
+ "guid": "toolkit@mozilla.org"
+ },{
+ "maxVersion": "7",
+ "guid": "toolkit@mozilla.org"
+ }]
+ }]
+ },
+ {
+ "_comment": "Invalid version range, should not block",
+ "guid": "test_bug449027_18@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{
+ "minVersion": "11",
+ "maxVersion": "9",
+ "guid": "toolkit@mozilla.org"
+ }]
+ }]
+ },
+ {
+ "_comment": "Should block all of the following",
+ "guid": "test_bug449027_19@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "10",
+ "maxVersion": "11"
+ },
+ {
+ "minVersion": "8",
+ "maxVersion": "9"
+ },
+ {
+ "maxVersion": "7"
+ }
+ ]
+ }]
+ },
+ {
+ "guid": "test_bug449027_20@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [
+ {
+ "guid": "toolkit@mozilla.org",
+ "maxVersion": "7"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "7",
+ "maxVersion": "8"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "9",
+ "maxVersion": "10"
+ },
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }]
+ },
+ {
+ "guid": "test_bug449027_21@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "6",
+ "maxVersion": "6"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "7",
+ "maxVersion": "9"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "10",
+ "maxVersion": "11"
+ }
+ ]
+ }]
+ },
+ {
+ "guid": "test_bug449027_22@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "8"
+ }]
+ }]
+ },
+ {
+ "guid": "test_bug449027_23@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "7"
+ },
+ {
+ "guid": "foo@bar.com"
+ }]
+ }]
+ },
+ {
+ "guid": "test_bug449027_24@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{
+ "maxVersion": "8",
+ "guid": "toolkit@mozilla.org"
+ }]
+ }]
+ },
+ {
+ "guid": "test_bug449027_25@tests.mozilla.org",
+ "versionRange": [{
+ "targetApplication": [{
+ "guid": "toolkit@mozilla.org",
+ "maxVersion": "9"
+ }]
+ }]
+ }
+]
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-plugins.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-plugins.json
new file mode 100644
index 0000000000..a186315102
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit-plugins.json
@@ -0,0 +1,155 @@
+[
+ {
+ "_general_comment": "All plugins are version 5 and tests run against appVersion 3",
+ "_general_comment2": "Test 1-14 not listed, should never get blocked",
+
+ "_comment": "Should block for any version of the app",
+ "matchName": "^test_bug449027_15$",
+ "versionRange": [{
+ "targetApplication": [{"guid": "toolkit@mozilla.org"}]
+ }]
+ },
+ {
+ "_comment": "Should still block",
+ "matchName": "^test_bug449027_16$",
+ "versionRange": [{
+ "targetApplication": [{"guid": "toolkit@mozilla.org"}]
+ }]
+ },
+ {
+ "_comment": "Not blocked since neither version range matches",
+ "matchName": "^test_bug449027_17$",
+ "versionRange": [{
+ "targetApplication": [{
+ "minVersion": "9",
+ "guid": "toolkit@mozilla.org"
+ },{
+ "maxVersion": "7",
+ "guid": "toolkit@mozilla.org"
+ }]
+ }]
+ },
+ {
+ "_comment": "Invalid version range, should not block",
+ "matchName": "^test_bug449027_18$",
+ "versionRange": [{
+ "targetApplication": [{
+ "minVersion": "11",
+ "maxVersion": "9",
+ "guid": "toolkit@mozilla.org"
+ }]
+ }]
+ },
+ {
+ "_comment": "Should block all of the following",
+ "matchName": "^test_bug449027_19$",
+ "versionRange": [{
+ "targetApplication": [
+ {
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "10",
+ "maxVersion": "11"
+ },
+ {
+ "minVersion": "8",
+ "maxVersion": "9"
+ },
+ {
+ "maxVersion": "7"
+ }
+ ]
+ }]
+ },
+ {
+ "matchName": "^test_bug449027_20$",
+ "versionRange": [{
+ "targetApplication": [
+ {
+ "guid": "toolkit@mozilla.org",
+ "maxVersion": "7"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "7",
+ "maxVersion": "8"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "9",
+ "maxVersion": "10"
+ },
+ {
+ "guid": "foo@bar.com"
+ }
+ ]
+ }]
+ },
+ {
+ "matchName": "^test_bug449027_21$",
+ "versionRange": [{
+ "targetApplication": [
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "6",
+ "maxVersion": "6"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "7",
+ "maxVersion": "9"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "10",
+ "maxVersion": "11"
+ }
+ ]
+ }]
+ },
+ {
+ "matchName": "^test_bug449027_22$",
+ "versionRange": [{
+ "targetApplication": [{
+ "guid": "foo@bar.com"
+ },
+ {
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "8"
+ }]
+ }]
+ },
+ {
+ "matchName": "^test_bug449027_23$",
+ "versionRange": [{
+ "targetApplication": [{
+ "guid": "toolkit@mozilla.org",
+ "minVersion": "7"
+ },
+ {
+ "guid": "foo@bar.com"
+ }]
+ }]
+ },
+ {
+ "matchName": "^test_bug449027_24$",
+ "versionRange": [{
+ "targetApplication": [{
+ "maxVersion": "8",
+ "guid": "toolkit@mozilla.org"
+ }]
+ }]
+ },
+ {
+ "matchName": "^test_bug449027_25$",
+ "versionRange": [{
+ "targetApplication": [{
+ "guid": "toolkit@mozilla.org",
+ "maxVersion": "9"
+ }]
+ }]
+ }
+]
+
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit.xml
new file mode 100644
index 0000000000..ad8ec5ed9d
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug449027_toolkit.xml
@@ -0,0 +1,208 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <!-- All extensions are version 5 and tests run against toolkitVersion 8 -->
+
+ <!-- Test 1-14 not listed, should never get blocked -->
+
+ <!-- Should block for any version of the app -->
+ <emItem id="test_bug449027_15@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org"/>
+ </versionRange>
+ </emItem>
+ <!-- Should still block -->
+ <emItem id="test_bug449027_16@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <!-- Not blocked since neither version range matches -->
+ <emItem id="test_bug449027_17@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="9"/>
+ <versionRange maxVersion="7"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <!-- Invalid version range, should not block -->
+ <emItem id="test_bug449027_18@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="11" maxVersion="9"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <!-- Should block all of these -->
+ <emItem id="test_bug449027_19@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="10" maxVersion="11"/>
+ <versionRange minVersion="8" maxVersion="9"/>
+ <versionRange maxVersion="7"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_20@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange maxVersion="7"/>
+ <versionRange minVersion="7" maxVersion="8"/>
+ <versionRange minVersion="9" maxVersion="10"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_21@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="6" maxVersion="6"/>
+ <versionRange minVersion="7" maxVersion="9"/>
+ <versionRange minVersion="10" maxVersion="11"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_22@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="8"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_23@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="7"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_24@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange maxVersion="8"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ <emItem id="test_bug449027_25@tests.mozilla.org">
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange maxVersion="9"/>
+ </targetApplication>
+ </versionRange>
+ </emItem>
+ </emItems>
+ <pluginItems>
+ <!-- All plugins are version 5 and tests run against appVersion 3 -->
+
+ <!-- Test 1-14 not listed, should never get blocked -->
+ <!-- Should block for any version of the app -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_15$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org"/>
+ </versionRange>
+ </pluginItem>
+ <!-- Should still block -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_16$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <!-- Not blocked since neither version range matches -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_17$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="9"/>
+ <versionRange maxVersion="7"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <!-- Invalid version range, should not block -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_18$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="11" maxVersion="9"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <!-- Should block all of these -->
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_19$"/>
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="10" maxVersion="11"/>
+ <versionRange minVersion="8" maxVersion="9"/>
+ <versionRange maxVersion="7"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_20$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange maxVersion="7"/>
+ <versionRange minVersion="7" maxVersion="8"/>
+ <versionRange minVersion="9" maxVersion="10"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_21$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="6" maxVersion="6"/>
+ <versionRange minVersion="7" maxVersion="9"/>
+ <versionRange minVersion="10" maxVersion="11"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_22$"/>
+ <versionRange>
+ <targetApplication id="foo@bar.com"/>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="8"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_23$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange minVersion="7"/>
+ </targetApplication>
+ <targetApplication id="foo@bar.com"/>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_24$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange maxVersion="8"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug449027_25$"/>
+ <versionRange>
+ <targetApplication id="toolkit@mozilla.org">
+ <versionRange maxVersion="9"/>
+ </targetApplication>
+ </versionRange>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug468528.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug468528.xml
new file mode 100644
index 0000000000..85f0da57ce
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug468528.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="^test_bug468528_1"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug468528_2["/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug468528_3"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_1.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_1.xml
new file mode 100644
index 0000000000..c4cc2fe37a
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_1.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="^test_bug514327_1"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug514327_2"/>
+ <versionRange severity="0"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_bug514327_3"/>
+ <versionRange severity="0"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_2.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_2.xml
new file mode 100644
index 0000000000..cc0a0c69df
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_2.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="Test Plug-in"/>
+ <versionRange severity="0"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_empty.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_empty.xml
new file mode 100644
index 0000000000..0261794f8a
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_empty.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml
new file mode 100644
index 0000000000..d651f87996
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="test_bug514327_1"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="test_bug514327_outdated"/>
+ <versionRange severity="0"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml
new file mode 100644
index 0000000000..208444681e
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="test_bug514327_2"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="test_bug514327_outdated"/>
+ <versionRange severity="0"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_bug655254.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug655254.json
new file mode 100644
index 0000000000..3b1dd81dab
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_bug655254.json
@@ -0,0 +1,17 @@
+{
+ "addons": {
+ "addon1@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "2"
+ }
+ },
+ "version": "1"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_corrupt.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_corrupt.json
new file mode 100644
index 0000000000..7cb48d4798
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_corrupt.json
@@ -0,0 +1,30 @@
+{
+ "addons": {
+ "addon3@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "2"
+ }
+ },
+ "version": "1.0"
+ }
+ ]
+ },
+ "addon4@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "2"
+ }
+ },
+ "version": "1.0"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete.json
new file mode 100644
index 0000000000..72619d825c
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete.json
@@ -0,0 +1,11 @@
+{
+ "addons": {
+ "test_delay_update_complete_webext@tests.mozilla.org": {
+ "updates": [
+ { "version": "2.0",
+ "update_link": "http://example.com/addons/test_delay_update_complete_webextension_v2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete_legacy.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete_legacy.json
new file mode 100644
index 0000000000..125d1b1a91
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_complete_legacy.json
@@ -0,0 +1,18 @@
+{
+ "addons": {
+ "test_delay_update_complete@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ },
+ "version": "2.0",
+ "update_link": "http://example.com/addons/test_delay_update_complete_v2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer.json
new file mode 100644
index 0000000000..b03d635e47
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer.json
@@ -0,0 +1,11 @@
+{
+ "addons": {
+ "test_delay_update_defer_webext@tests.mozilla.org": {
+ "updates": [
+ { "version": "2.0",
+ "update_link": "http://example.com/addons/test_delay_update_defer_webextension_v2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer_legacy.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer_legacy.json
new file mode 100644
index 0000000000..d434fe2e17
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_defer_legacy.json
@@ -0,0 +1,18 @@
+{
+ "addons": {
+ "test_delay_update_defer@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ },
+ "version": "2.0",
+ "update_link": "http://example.com/addons/test_delay_update_defer_v2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore.json
new file mode 100644
index 0000000000..4b2e527960
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore.json
@@ -0,0 +1,11 @@
+{
+ "addons": {
+ "test_delay_update_ignore_webext@tests.mozilla.org": {
+ "updates": [
+ { "version": "2.0",
+ "update_link": "http://example.com/addons/test_delay_update_ignore_webextension_v2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore_legacy.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore_legacy.json
new file mode 100644
index 0000000000..bc46fab8fd
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_delay_updates_ignore_legacy.json
@@ -0,0 +1,18 @@
+{
+ "addons": {
+ "test_delay_update_ignore@tests.mozilla.org": {
+ "updates": [
+ {
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ },
+ "version": "2.0",
+ "update_link": "http://example.com/addons/test_delay_update_ignore_v2.xpi"
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.json
new file mode 100644
index 0000000000..6efc854849
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist.json
@@ -0,0 +1,352 @@
+[
+ {
+ "blockID": "g35",
+ "os": "WINNT 6.1",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.2202 ",
+ "driverVersionComparator": " LESS_THAN "
+ },
+ {
+ "os": "WINNT 6.0",
+ "vendor": "0xdcba",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_9_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.2202 ",
+ "driverVersionComparator": " LESS_THAN "
+ },
+ {
+ "blockID": "g36",
+ "os": "WINNT 6.1",
+ "vendor": "0xabab",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.2202 ",
+ "driverVersionComparator": " GREATER_THAN_OR_EQUAL "
+ },
+ {
+ "os": "WINNT 6.1",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1111 ",
+ "driverVersionComparator": " EQUAL "
+ },
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+ {
+ "os": "Android",
+ "vendor": "abcd",
+ "devices": [
+ "wxyz",
+ "asdf",
+ "erty"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 5 ",
+ "driverVersionComparator": " LESS_THAN_OR_EQUAL "
+ },
+ {
+ "os": "Android",
+ "vendor": "dcdc",
+ "devices": [
+ "uiop",
+ "vbnm",
+ "hjkl"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 5 ",
+ "driverVersionComparator": " EQUAL "
+ },
+ {
+ "os": "Android",
+ "vendor": "abab",
+ "devices": [
+ "ghjk",
+ "cvbn"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 7 ",
+ "driverVersionComparator": " GREATER_THAN_OR_EQUAL "
+ },
+ {
+ "os": "WINNT 6.1",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "WINNT 6.1",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " WEBRENDER ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " WEBRENDER ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " WEBRENDER ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x6666"
+ ],
+ "feature": " WEBRENDER ",
+ "featureStatus": " BLOCKED_DEVICE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1112 ",
+ "driverVersionMax": " 8.52.323.1000 ",
+ "driverVersionComparator": " BETWEEN_EXCLUSIVE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " OPENGL_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.50.322.1000 ",
+ "driverVersionMax": " 8.52.322.1112 ",
+ "driverVersionComparator": " BETWEEN_EXCLUSIVE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1000 ",
+ "driverVersionMax": " 9.52.322.1000 ",
+ "driverVersionComparator": " BETWEEN_EXCLUSIVE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " HARDWARE_VIDEO_DECODING ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 7.82.322.1000 ",
+ "driverVersionMax": " 9.25.322.1001 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_H264 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1112 ",
+ "driverVersionMax": " 9.52.322.1300 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_DECODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1000 ",
+ "driverVersionMax": " 8.52.322.1112 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_ENCODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1112 ",
+ "driverVersionMax": " 8.52.322.1200 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE_START "
+ },
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_MSAA ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1000 ",
+ "driverVersionMax": " 8.52.322.1200 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE_START "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1000 ",
+ "driverVersionMax": " 8.52.322.1112 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE_START "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL2 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1000 ",
+ "driverVersionMax": " 8.52.322.1112 ",
+ "driverVersionComparator": " BETWEEN_INCLUSIVE_START "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xdcdc",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " CANVAS2D_ACCELERATION ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.1000 ",
+ "driverVersionMax": " 9.52.322.1000 ",
+ "driverVersionComparator": " BETWEEN_EXCLUSIVE "
+ }
+]
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.json
new file mode 100755
index 0000000000..7072736127
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_AllOS.json
@@ -0,0 +1,837 @@
+[
+ {
+ "blockID": "g1",
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g2",
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "22.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_9_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_LAYERS",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1", "maxVersion": "22.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_1_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " OPENGL_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g11",
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "14.0b2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_OPENGL ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL2 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_MSAA ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " STAGEFRIGHT ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_H264 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_ENCODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_DECODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "17.2a2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "13.2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " HARDWARE_VIDEO_DECODING ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "All",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "10.5", "maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g1",
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g2",
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "22.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_9_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_LAYERS",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1", "maxVersion": "22.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_1_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " OPENGL_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g11",
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "14.0b2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_OPENGL ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL2 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_MSAA ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " STAGEFRIGHT ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_H264 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_ENCODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_DECODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "17.2a2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "13.2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " HARDWARE_VIDEO_DECODING ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "10.5", "maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g1",
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g2",
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "22.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_9_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_LAYERS",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1", "maxVersion": "22.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_1_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " OPENGL_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g11",
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "14.0b2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_OPENGL ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL2 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_MSAA ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " STAGEFRIGHT ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_H264 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_ENCODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_DECODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "17.2a2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "13.2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " HARDWARE_VIDEO_DECODING ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Linux",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "10.5", "maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g1",
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g2",
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "22.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_9_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_LAYERS",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "16.0a1", "maxVersion": "22.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_10_1_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " OPENGL_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "blockID": "g11",
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "14.0b2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_OPENGL ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL2 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "12.0", "maxVersion": "16.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBGL_MSAA ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " STAGEFRIGHT ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_H264 ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_ENCODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "42.0", "maxVersion": "13.0b2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " WEBRTC_HW_ACCELERATION_DECODE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "17.2a2", "maxVersion": "15.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "15.0", "maxVersion": "13.2"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " HARDWARE_VIDEO_DECODING ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ },
+
+ {
+ "os": "Android",
+ "vendor": "0xabcd",
+ "versionRange": {"minVersion": "10.5", "maxVersion": "13.0"},
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT3D_11_ANGLE ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION "
+ }
+]
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.json
new file mode 100644
index 0000000000..fa4f03dc32
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.json
@@ -0,0 +1,28 @@
+[
+ {
+ "os": "WINNT 6.2",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " DIRECT2D ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.2202 ",
+ "driverVersionComparator": " LESS_THAN "
+ },
+ {
+ "os": "Darwin 13",
+ "vendor": "0xabcd",
+ "devices": [
+ "0x2783",
+ "0x1234",
+ "0x2782"
+ ],
+ "feature": " OPENGL_LAYERS ",
+ "featureStatus": " BLOCKED_DRIVER_VERSION ",
+ "driverVersion": " 8.52.322.2202 ",
+ "driverVersionComparator": " LESS_THAN "
+ }
+]
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_install_addons.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_install_addons.json
new file mode 100644
index 0000000000..cb1f2f4fae
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_install_addons.json
@@ -0,0 +1,31 @@
+{
+ "page_size": 25,
+ "page_count": 1,
+ "count": 1,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "name": "Real Test 2",
+ "type": "extension",
+ "guid": "addon2@tests.mozilla.org",
+ "current_version": {
+ "version": "1.0",
+ "files": [
+ {
+ "size": 2,
+ "url": "http://example.com/browser/toolkit/mozapps/extensions/test/browser/addons/browser_install1_2.xpi"
+ }
+ ]
+ },
+ "authors": [
+ {
+ "name": "Test Creator",
+ "url": "http://example.com/creator.html"
+ }
+ ],
+ "summary": "Repository summary",
+ "description": "Repository description"
+ }
+ ]
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_install_compat.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_install_compat.json
new file mode 100644
index 0000000000..a068197648
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_install_compat.json
@@ -0,0 +1,27 @@
+{
+ "page_size": 25,
+ "page_count": 1,
+ "count": 1,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "addon_guid": "addon6@tests.mozilla.org",
+ "name": "Addon Test 6",
+ "version_ranges": [
+ {
+ "addon_min_version": "1.0",
+ "addon_max_version": "1.0",
+ "applications": [
+ {
+ "name": "XPCShell",
+ "guid": "xpcshell@tests.mozilla.org",
+ "min_version": "1.0",
+ "max_version": "1.0"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_no_update.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_no_update.json
new file mode 100644
index 0000000000..2773c7f98f
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_no_update.json
@@ -0,0 +1,7 @@
+{
+ "addons": {
+ "test_no_update_webext@tests.mozilla.org": {
+ "updates": []
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/ancient.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/ancient.xml
new file mode 100644
index 0000000000..699257f87e
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/ancient.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem blockID="i454" id="ancient@tests.mozilla.org">
+ <versionRange minVersion="0" maxVersion="*" severity="3"/>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/new.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/new.xml
new file mode 100644
index 0000000000..8cbfb5d6a0
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/new.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1396046918000">
+ <emItems>
+ <emItem blockID="i454" id="new@tests.mozilla.org">
+ <versionRange minVersion="0" maxVersion="*" severity="3"/>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/old.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/old.xml
new file mode 100644
index 0000000000..75bd6e934c
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_overrideblocklist/old.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0"?>
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist" lastupdate="1296046918000">
+ <emItems>
+ <emItem blockID="i454" id="old@tests.mozilla.org">
+ <versionRange minVersion="0" maxVersion="*" severity="3"/>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtp.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtp.xml
new file mode 100644
index 0000000000..d3564aebdb
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtp.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="^test_plugin_0"/>
+ <versionRange minVersion="0" maxVersion="*" severity="0" vulnerabilitystatus="0"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_plugin_1"/>
+ <versionRange minVersion="0" maxVersion="*" severity="0" vulnerabilitystatus="1"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_plugin_2"/>
+ <versionRange minVersion="0" maxVersion="*" severity="0" vulnerabilitystatus="2"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_plugin_3"/>
+ <versionRange minVersion="0" maxVersion="*" vulnerabilitystatus="2"/>
+ </pluginItem>
+ <pluginItem>
+ <match name="name" exp="^test_plugin_4"/>
+ <versionRange minVersion="0" maxVersion="*" severity="1" vulnerabilitystatus="2"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml
new file mode 100644
index 0000000000..7cd8496b36
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <pluginItems>
+ <pluginItem>
+ <match name="name" exp="^Test Plug-in"/>
+ <versionRange minVersion="0" maxVersion="*" severity="0" vulnerabilitystatus="2"/>
+ </pluginItem>
+ </pluginItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_softblocked1.xml b/toolkit/mozapps/extensions/test/xpcshell/data/test_softblocked1.xml
new file mode 100644
index 0000000000..a1d18470c8
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_softblocked1.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<blocklist xmlns="http://www.mozilla.org/2006/addons-blocklist">
+ <emItems>
+ <emItem id="softblock1@tests.mozilla.org">
+ <versionRange severity="1"/>
+ </emItem>
+ </emItems>
+</blocklist>
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_update.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_update.json
new file mode 100644
index 0000000000..9e3483d520
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_update.json
@@ -0,0 +1,137 @@
+{
+ "addons": {
+ "addon1@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_min_version": "1"
+ }
+ }
+ },
+ {
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "2",
+ "strict_min_version": "2"
+ }
+ }
+ },
+ {
+ "version": "2.0",
+ "update_link": "http://example.com/addons/test_update.xpi",
+ "update_info_url": "http://example.com/updateInfo.xhtml",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_min_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon2@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon2@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon3@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "3",
+ "advisory_max_version": "3"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon4@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "5.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "0"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon7@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0",
+ "advisory_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon8@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "http://example.com/addons/test_update8.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "addon12@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "http://example.com/addons/test_update12.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "advisory_max_version": "1"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_update_addons.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_update_addons.json
new file mode 100644
index 0000000000..3bcbc022e0
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_update_addons.json
@@ -0,0 +1,14 @@
+{
+ "page_size": 25,
+ "page_count": 1,
+ "count": 1,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "name": "Ttest Addon 9",
+ "type": "extension",
+ "guid": "addon9@tests.mozilla.org"
+ }
+ ]
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_update_compat.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_update_compat.json
new file mode 100644
index 0000000000..9721d3466a
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_update_compat.json
@@ -0,0 +1,28 @@
+{
+ "page_size": 25,
+ "page_count": 1,
+ "count": 1,
+ "next": null,
+ "previous": null,
+ "results": [
+ {
+ "addon_guid": "addon9@tests.mozilla.org",
+ "name": "Test Addon 9",
+ "version_ranges": [
+ {
+ "addon_min_version": "4",
+ "addon_max_version": "4",
+ "applications": [
+ {
+ "name": "XPCShell",
+ "id": "XPCShell",
+ "guid": "xpcshell@tests.mozilla.org",
+ "min_version": "1",
+ "max_version": "1"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/test_updatecheck.json b/toolkit/mozapps/extensions/test/xpcshell/data/test_updatecheck.json
new file mode 100644
index 0000000000..f61bfeacd3
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/test_updatecheck.json
@@ -0,0 +1,269 @@
+{
+ "addons": {
+ "updatecheck1@tests.mozilla.org": {
+ "updates": [
+ {
+ "version": "1.0",
+ "update_link": "https://example.com/addons/test1.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ },
+ {
+ "_comment_": "This update is incompatible and so should not be considered a valid update",
+ "version": "2.0",
+ "update_link": "https://example.com/addons/test2.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "2",
+ "strict_max_version": "2"
+ }
+ }
+ },
+ {
+ "version": "3.0",
+ "update_link": "https://example.com/addons/test3.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ },
+ {
+ "version": "2.0",
+ "update_link": "https://example.com/addons/test2.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "2"
+ }
+ }
+ },
+ {
+ "_comment_": "This update is incompatible and so should not be considered a valid update",
+ "version": "4.0",
+ "update_link": "https://example.com/addons/test4.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "2",
+ "strict_max_version": "2"
+ }
+ }
+ }
+ ]
+ },
+
+ "test_bug378216_8@tests.mozilla.org": {
+ "_comment_": "The updateLink will be ignored since it is not secure and there is no updateHash.",
+
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "http://example.com/broken.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "test_bug378216_9@tests.mozilla.org": {
+ "_comment_": "The updateLink will used since there is an updateHash to verify it.",
+
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "http://example.com/broken.xpi",
+ "update_hash": "sha256:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "test_bug378216_10@tests.mozilla.org": {
+ "_comment_": "The updateLink will used since it is a secure URL.",
+
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "https://example.com/broken.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "test_bug378216_11@tests.mozilla.org": {
+ "_comment_": "The updateLink will used since it is a secure URL.",
+
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "https://example.com/broken.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "test_bug378216_12@tests.mozilla.org": {
+ "_comment_": "The updateLink will not be used since the updateHash verifying it is not strong enough.",
+
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "http://example.com/broken.xpi",
+ "update_hash": "sha1:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "test_bug378216_13@tests.mozilla.org": {
+ "_comment_": "An update with a weak hash. The updateLink will used since it is a secure URL.",
+
+ "updates": [
+ {
+ "version": "2.0",
+ "update_link": "https://example.com/broken.xpi",
+ "update_hash": "sha1:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "1",
+ "strict_max_version": "1"
+ }
+ }
+ }
+ ]
+ },
+
+ "_comment_": "There should be no information present for test_bug378216_14",
+
+ "test_bug378216_15@tests.mozilla.org": {
+ "_comment_": "Invalid update JSON",
+
+ "updates": "foo"
+ },
+
+ "ignore-compat@tests.mozilla.org": {
+ "_comment_": "Various updates available - one is not compatible, but compatibility checking is disabled",
+
+ "updates": [
+ {
+ "version": "1.0",
+ "update_link": "https://example.com/addons/test1.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0.1",
+ "advisory_max_version": "0.2"
+ }
+ }
+ },
+ {
+ "version": "2.0",
+ "update_link": "https://example.com/addons/test2.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0.5",
+ "advisory_max_version": "0.6"
+ }
+ }
+ },
+ {
+ "_comment_": "Update for future app versions - should never be compatible",
+ "version": "3.0",
+ "update_link": "https://example.com/addons/test3.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "2",
+ "advisory_max_version": "3"
+ }
+ }
+ }
+ ]
+ },
+
+ "compat-override@tests.mozilla.org": {
+ "_comment_": "Various updates available - one is not compatible, but compatibility checking is disabled",
+
+ "updates": [
+ {
+ "_comment_": "Has compatibility override, but it doesn't match this app version",
+ "version": "1.0",
+ "update_link": "https://example.com/addons/test1.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0.1",
+ "advisory_max_version": "0.2"
+ }
+ }
+ },
+ {
+ "_comment_": "Has compatibility override, so is incompaible",
+ "version": "2.0",
+ "update_link": "https://example.com/addons/test2.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0.5",
+ "advisory_max_version": "0.6"
+ }
+ }
+ },
+ {
+ "_comment_": "Update for future app versions - should never be compatible",
+ "version": "3.0",
+ "update_link": "https://example.com/addons/test3.xpi",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "2",
+ "advisory_max_version": "3"
+ }
+ }
+ }
+ ]
+ },
+
+ "compat-strict-optin@tests.mozilla.org": {
+ "_comment_": "Opt-in to strict compatibility checking",
+
+ "updates": [
+ {
+ "version": "1.0",
+ "update_link": "https://example.com/addons/test1.xpi",
+ "_comment_": "strictCompatibility: true",
+ "applications": {
+ "gecko": {
+ "strict_min_version": "0.1",
+ "strict_max_version": "0.2"
+ }
+ }
+ }
+ ]
+ }
+ }
+}
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/unsigned.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/unsigned.xpi
new file mode 100644
index 0000000000..12a13f139b
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/unsigned.xpi
Binary files differ
diff --git a/toolkit/mozapps/extensions/test/xpcshell/data/webext-implicit-id.xpi b/toolkit/mozapps/extensions/test/xpcshell/data/webext-implicit-id.xpi
new file mode 100644
index 0000000000..6b4abaa691
--- /dev/null
+++ b/toolkit/mozapps/extensions/test/xpcshell/data/webext-implicit-id.xpi
Binary files differ