From 4fb11cd5966461bccc3ed1599b808237be6b0de9 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sat, 10 Feb 2018 02:49:12 -0500 Subject: Move WebExtensions enabled Add-ons Manager --- .../test/xpcshell/data/BootstrapMonitor.jsm | 30 + .../xpcshell/data/blocklistchange/addon_change.xml | 31 + .../data/blocklistchange/addon_update1.rdf | 144 ++++ .../data/blocklistchange/addon_update2.rdf | 144 ++++ .../data/blocklistchange/addon_update3.rdf | 144 ++++ .../xpcshell/data/blocklistchange/app_update.xml | 62 ++ .../data/blocklistchange/blocklist_update1.xml | 3 + .../data/blocklistchange/blocklist_update2.xml | 26 + .../data/blocklistchange/manual_update.xml | 27 + .../test/xpcshell/data/bug455906_block.xml | 18 + .../test/xpcshell/data/bug455906_empty.xml | 7 + .../test/xpcshell/data/bug455906_start.xml | 30 + .../test/xpcshell/data/bug455906_warn.xml | 33 + .../webextensions/test/xpcshell/data/corrupt.xpi | 1 + .../test/xpcshell/data/corruptfile.xpi | Bin 0 -> 633 bytes .../webextensions/test/xpcshell/data/empty.xpi | Bin 0 -> 197 bytes .../test/xpcshell/data/from_sources/bootstrap.js | 1 + .../test/xpcshell/data/from_sources/install.rdf | 28 + .../test/xpcshell/data/pluginInfoURL_block.xml | 45 ++ .../test/xpcshell/data/productaddons/bad.txt | 1 + .../test/xpcshell/data/productaddons/bad.xml | 3 + .../test/xpcshell/data/productaddons/bad2.xml | 3 + .../test/xpcshell/data/productaddons/empty.xml | 5 + .../test/xpcshell/data/productaddons/good.xml | 11 + .../test/xpcshell/data/productaddons/missing.xml | 3 + .../test/xpcshell/data/productaddons/unsigned.xpi | Bin 0 -> 452 bytes .../data/signing_checks/bootstrap_1/bootstrap.js | 29 + .../data/signing_checks/bootstrap_1/install.rdf | 24 + .../data/signing_checks/bootstrap_1/test.txt | 1 + .../data/signing_checks/bootstrap_2/bootstrap.js | 29 + .../data/signing_checks/bootstrap_2/install.rdf | 24 + .../data/signing_checks/bootstrap_2/test.txt | 1 + .../xpcshell/data/signing_checks/hotfix_badid.xpi | Bin 0 -> 5151 bytes .../xpcshell/data/signing_checks/hotfix_broken.xpi | Bin 0 -> 5298 bytes .../xpcshell/data/signing_checks/hotfix_good.xpi | Bin 0 -> 5158 bytes .../xpcshell/data/signing_checks/long_63_hash.xpi | Bin 0 -> 4471 bytes .../xpcshell/data/signing_checks/long_63_plain.xpi | Bin 0 -> 4433 bytes .../xpcshell/data/signing_checks/long_64_hash.xpi | Bin 0 -> 4474 bytes .../xpcshell/data/signing_checks/long_64_plain.xpi | Bin 0 -> 4436 bytes .../xpcshell/data/signing_checks/long_65_hash.xpi | Bin 0 -> 4487 bytes .../xpcshell/data/signing_checks/multi_badid.xpi | Bin 0 -> 6443 bytes .../xpcshell/data/signing_checks/multi_broken.xpi | Bin 0 -> 6563 bytes .../xpcshell/data/signing_checks/multi_signed.xpi | Bin 0 -> 6425 bytes .../data/signing_checks/multi_unsigned.xpi | Bin 0 -> 2436 bytes .../data/signing_checks/nonbootstrap_1/install.rdf | 23 + .../data/signing_checks/nonbootstrap_1/test.txt | 1 + .../data/signing_checks/nonbootstrap_2/install.rdf | 23 + .../data/signing_checks/nonbootstrap_2/test.txt | 1 + .../signing_checks/preliminary_bootstrap_2.xpi | Bin 0 -> 5161 bytes .../data/signing_checks/signed_bootstrap_1.xpi | Bin 0 -> 5150 bytes .../data/signing_checks/signed_bootstrap_2.xpi | Bin 0 -> 5149 bytes .../signing_checks/signed_bootstrap_badid_2.xpi | Bin 0 -> 5155 bytes .../data/signing_checks/signed_nonbootstrap_2.xpi | Bin 0 -> 4627 bytes .../signing_checks/signed_nonbootstrap_badid_2.xpi | Bin 0 -> 4634 bytes .../data/signing_checks/unsigned_bootstrap_2.xpi | Bin 0 -> 1156 bytes .../signing_checks/unsigned_nonbootstrap_2.xpi | Bin 0 -> 691 bytes .../test/xpcshell/data/system_addons/bootstrap.js | 1 + .../test/xpcshell/data/system_addons/system1_1.xpi | Bin 0 -> 4692 bytes .../data/system_addons/system1_1_badcert.xpi | Bin 0 -> 4808 bytes .../test/xpcshell/data/system_addons/system1_2.xpi | Bin 0 -> 4695 bytes .../test/xpcshell/data/system_addons/system2_1.xpi | Bin 0 -> 4692 bytes .../test/xpcshell/data/system_addons/system2_2.xpi | Bin 0 -> 4695 bytes .../test/xpcshell/data/system_addons/system2_3.xpi | Bin 0 -> 4697 bytes .../test/xpcshell/data/system_addons/system3_1.xpi | Bin 0 -> 4689 bytes .../test/xpcshell/data/system_addons/system3_2.xpi | Bin 0 -> 4691 bytes .../test/xpcshell/data/system_addons/system3_3.xpi | Bin 0 -> 4693 bytes .../test/xpcshell/data/system_addons/system4_1.xpi | Bin 0 -> 4692 bytes .../test/xpcshell/data/system_addons/system5_1.xpi | Bin 0 -> 4691 bytes .../data/system_addons/system6_1_unpack.xpi | Bin 0 -> 4708 bytes .../data/system_addons/system6_2_notBootstrap.xpi | Bin 0 -> 4682 bytes .../system_addons/system6_3_notMultiprocess.xpi | Bin 0 -> 4675 bytes .../data/system_addons/system_delay_complete.xpi | Bin 0 -> 5090 bytes .../data/system_addons/system_delay_complete_2.xpi | Bin 0 -> 4706 bytes .../data/system_addons/system_delay_defer.xpi | Bin 0 -> 5095 bytes .../data/system_addons/system_delay_defer_2.xpi | Bin 0 -> 4701 bytes .../data/system_addons/system_delay_defer_also.xpi | Bin 0 -> 5117 bytes .../system_addons/system_delay_defer_also_2.xpi | Bin 0 -> 4716 bytes .../data/system_addons/system_delay_ignore.xpi | Bin 0 -> 5098 bytes .../data/system_addons/system_delay_ignore_2.xpi | Bin 0 -> 4707 bytes .../data/system_addons/system_failed_update.xpi | Bin 0 -> 735 bytes .../test/xpcshell/data/test_AddonRepository.xml | 820 +++++++++++++++++++++ .../xpcshell/data/test_AddonRepository_cache.xml | 182 +++++ .../test_AddonRepository_compatmode_ignore.xml | 23 + .../test_AddonRepository_compatmode_normal.xml | 23 + .../test_AddonRepository_compatmode_strict.xml | 23 + .../xpcshell/data/test_AddonRepository_empty.xml | 3 + .../xpcshell/data/test_AddonRepository_failed.xml | 21 + .../data/test_AddonRepository_getAddonsByIDs.xml | 187 +++++ .../test/xpcshell/data/test_backgroundupdate.rdf | 70 ++ .../data/test_blocklist_metadata_filters_1.xml | 21 + .../test/xpcshell/data/test_blocklist_prefs_1.xml | 28 + .../test/xpcshell/data/test_blocklist_regexp_1.xml | 20 + .../test/xpcshell/data/test_bug299716.rdf | 181 +++++ .../test/xpcshell/data/test_bug299716_2.rdf | 23 + .../test/xpcshell/data/test_bug324121.rdf | 91 +++ .../test/xpcshell/data/test_bug393285.xml | 30 + .../test/xpcshell/data/test_bug394300.rdf | 159 ++++ .../test/xpcshell/data/test_bug424262.xml | 185 +++++ .../test/xpcshell/data/test_bug449027_app.xml | 333 +++++++++ .../test/xpcshell/data/test_bug449027_toolkit.xml | 208 ++++++ .../test/xpcshell/data/test_bug468528.xml | 15 + .../xpcshell/data/test_bug470377/install_1.rdf | 17 + .../xpcshell/data/test_bug470377/install_2.rdf | 17 + .../xpcshell/data/test_bug470377/install_3.rdf | 17 + .../xpcshell/data/test_bug470377/install_4.rdf | 17 + .../xpcshell/data/test_bug470377/install_5.rdf | 17 + .../test/xpcshell/data/test_bug470377/update_1.rdf | 26 + .../test/xpcshell/data/test_bug470377/update_2.rdf | 26 + .../test/xpcshell/data/test_bug470377/update_3.rdf | 26 + .../test/xpcshell/data/test_bug470377/update_4.rdf | 26 + .../test/xpcshell/data/test_bug470377/update_5.rdf | 26 + .../test/xpcshell/data/test_bug514327_1.xml | 17 + .../test/xpcshell/data/test_bug514327_2.xml | 10 + .../test/xpcshell/data/test_bug514327_3_empty.xml | 4 + .../xpcshell/data/test_bug514327_3_outdated_1.xml | 13 + .../xpcshell/data/test_bug514327_3_outdated_2.xml | 13 + .../test/xpcshell/data/test_bug526598_1.xpi | Bin 0 -> 458 bytes .../test/xpcshell/data/test_bug526598_2.xpi | Bin 0 -> 458 bytes .../test/xpcshell/data/test_bug541420.xpi | Bin 0 -> 577 bytes .../test/xpcshell/data/test_bug542391.rdf | 25 + .../test/xpcshell/data/test_bug554133.xml | 292 ++++++++ .../test/xpcshell/data/test_bug619730.xml | 7 + .../test/xpcshell/data/test_bug655254.rdf | 26 + .../test/xpcshell/data/test_compatoverrides.xml | 228 ++++++ .../test/xpcshell/data/test_corrupt.rdf | 44 ++ .../data/test_delay_update_complete/bootstrap.js | 24 + .../data/test_delay_update_defer/bootstrap.js | 34 + .../data/test_delay_update_ignore/bootstrap.js | 26 + .../xpcshell/data/test_delay_updates_complete.json | 11 + .../xpcshell/data/test_delay_updates_complete.rdf | 26 + .../xpcshell/data/test_delay_updates_defer.json | 11 + .../xpcshell/data/test_delay_updates_defer.rdf | 26 + .../xpcshell/data/test_delay_updates_ignore.json | 11 + .../xpcshell/data/test_delay_updates_ignore.rdf | 26 + .../test/xpcshell/data/test_dictionary.rdf | 65 ++ .../data/test_distribution2_2/bootstrap.js | 21 + .../xpcshell/data/test_distribution2_2/install.rdf | 23 + .../data/test_distribution2_2/subdir/dummy.txt | 1 + .../test_distribution2_2/subdir/subdir2/dummy2.txt | 1 + .../test/xpcshell/data/test_gfxBlacklist.xml | 304 ++++++++ .../test/xpcshell/data/test_gfxBlacklist2.xml | 31 + .../test/xpcshell/data/test_gfxBlacklist_AllOS.xml | 783 ++++++++++++++++++++ .../xpcshell/data/test_gfxBlacklist_OSVersion.xml | 32 + .../test/xpcshell/data/test_hotfix_1.rdf | 26 + .../test/xpcshell/data/test_hotfix_2.rdf | 26 + .../test/xpcshell/data/test_hotfix_3.rdf | 26 + .../test/xpcshell/data/test_install.rdf | 63 ++ .../test/xpcshell/data/test_install.xml | 53 ++ .../test/xpcshell/data/test_migrate.rdf | 125 ++++ .../test/xpcshell/data/test_migrate4.rdf | 46 ++ .../test/xpcshell/data/test_no_update.json | 7 + .../data/test_overrideblocklist/ancient.xml | 8 + .../xpcshell/data/test_overrideblocklist/new.xml | 8 + .../xpcshell/data/test_overrideblocklist/old.xml | 8 + .../test/xpcshell/data/test_pluginBlocklistCtp.xml | 26 + .../xpcshell/data/test_pluginBlocklistCtpUndo.xml | 10 + .../test/xpcshell/data/test_proxy/bootstrap.js | 1 + .../test/xpcshell/data/test_softblocked1.xml | 9 + .../test/xpcshell/data/test_sourceURI.xml | 18 + .../test/xpcshell/data/test_temporary/bootstrap.js | 1 + .../test/xpcshell/data/test_update.json | 215 ++++++ .../test/xpcshell/data/test_update.rdf | 270 +++++++ .../test/xpcshell/data/test_update.xml | 26 + .../test/xpcshell/data/test_update_multi.rdf | 26 + .../test/xpcshell/data/test_updatecheck.json | 327 ++++++++ .../test/xpcshell/data/test_updatecheck.rdf | 419 +++++++++++ .../xpcshell/data/test_updatecompatmode_ignore.rdf | 26 + .../xpcshell/data/test_updatecompatmode_normal.rdf | 26 + .../xpcshell/data/test_updatecompatmode_strict.rdf | 26 + .../test/xpcshell/data/test_updateid.rdf | 26 + .../webextensions/test/xpcshell/data/unsigned.xpi | Bin 0 -> 452 bytes .../test/xpcshell/data/webext-implicit-id.xpi | Bin 0 -> 4182 bytes 172 files changed, 7801 insertions(+) create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/BootstrapMonitor.jsm create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_change.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update1.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update2.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update3.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/app_update.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/manual_update.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_block.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_empty.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_start.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_warn.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/corrupt.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/corruptfile.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/empty.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/pluginInfoURL_block.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad2.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/empty.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/good.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/missing.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/unsigned.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/test.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/test.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_badid.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_broken.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_good.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_hash.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_plain.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_hash.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_plain.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_65_hash.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_badid.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_broken.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_signed.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_unsigned.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/test.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/test.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/preliminary_bootstrap_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_badid_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_badid_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_bootstrap_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_nonbootstrap_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1_badcert.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_3.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_3.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system4_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system5_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_1_unpack.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_2_notBootstrap.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_3_notMultiprocess.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_failed_update.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_cache.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_ignore.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_normal.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_strict.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_empty.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_failed.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_backgroundupdate.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_prefs_1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_regexp_1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716_2.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug324121.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug393285.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug394300.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug424262.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_app.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_toolkit.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug468528.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_1.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_2.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_3.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_4.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_5.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_1.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_2.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_3.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_4.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_5.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_2.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_empty.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_1.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_2.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug541420.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug542391.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug554133.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug619730.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_bug655254.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_compatoverrides.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_corrupt.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_complete/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_defer/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_ignore/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.json create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.json create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.json create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_dictionary.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/dummy.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/subdir2/dummy2.txt create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist2.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_1.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_2.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_3.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_install.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_install.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate4.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_no_update.json create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/ancient.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/new.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/old.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtp.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_proxy/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_softblocked1.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_sourceURI.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_temporary/bootstrap.js create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_update.json create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_update.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_update.xml create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_update_multi.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.json create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_ignore.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_normal.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_strict.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/test_updateid.rdf create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/unsigned.xpi create mode 100644 toolkit/mozapps/webextensions/test/xpcshell/data/webext-implicit-id.xpi (limited to 'toolkit/mozapps/webextensions/test/xpcshell/data') diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/BootstrapMonitor.jsm b/toolkit/mozapps/webextensions/test/xpcshell/data/BootstrapMonitor.jsm new file mode 100644 index 000000000..7c1e4aa9d --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/BootstrapMonitor.jsm @@ -0,0 +1,30 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +this.EXPORTED_SYMBOLS = [ "monitor" ]; + +function notify(event, originalMethod, data, reason) { + let info = { + event, + data: Object.assign({}, data, { + installPath: data.installPath.path, + resourceURI: data.resourceURI.spec, + }), + reason + }; + + let subject = {wrappedJSObject: {data}}; + + Services.obs.notifyObservers(subject, "bootstrapmonitor-event", JSON.stringify(info)); + + // If the bootstrap scope already declares a method call it + if (originalMethod) + originalMethod(data, reason); +} + +// Allows a simple one-line bootstrap script: +// Components.utils.import("resource://xpcshelldata/bootstrapmonitor.jsm").monitor(this); +this.monitor = function(scope) { + for (let event of ["install", "startup", "shutdown", "uninstall"]) { + scope[event] = notify.bind(null, event, scope[event]); + } +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_change.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_change.xml new file mode 100644 index 000000000..a229a653a --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_change.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update1.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update1.rdf new file mode 100644 index 000000000..588290968 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update1.rdf @@ -0,0 +1,144 @@ + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft1_2.xpi + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft2_2.xpi + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft3_2.xpi + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft4_2.xpi + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft5_2.xpi + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_hard1_2.xpi + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_regexp1_2.xpi + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update2.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update2.rdf new file mode 100644 index 000000000..5c3747f5f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update2.rdf @@ -0,0 +1,144 @@ + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft1_3.xpi + + + + + + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft2_3.xpi + + + + + + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft3_3.xpi + + + + + + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft4_3.xpi + + + + + + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft5_3.xpi + + + + + + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_hard1_3.xpi + + + + + + + + + + + + + + 3 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_regexp1_3.xpi + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update3.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update3.rdf new file mode 100644 index 000000000..d60708414 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/addon_update3.rdf @@ -0,0 +1,144 @@ + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft1_1.xpi + + + + + + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft2_1.xpi + + + + + + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft3_1.xpi + + + + + + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft4_1.xpi + + + + + + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_soft5_1.xpi + + + + + + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_hard1_1.xpi + + + + + + + + + + + + + + 4 + + + toolkit@mozilla.org + 0 + * + http://localhost:%PORT%/addons/blocklist_regexp1_1.xpi + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/app_update.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/app_update.xml new file mode 100644 index 000000000..85a66fe55 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/app_update.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml new file mode 100644 index 000000000..87011cd39 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update1.xml @@ -0,0 +1,3 @@ + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml new file mode 100644 index 000000000..867a34255 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/blocklist_update2.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/manual_update.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/manual_update.xml new file mode 100644 index 000000000..df9276525 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/blocklistchange/manual_update.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_block.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_block.xml new file mode 100644 index 000000000..1f673ef2f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_block.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_empty.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_empty.xml new file mode 100644 index 000000000..88d22f281 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_empty.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_start.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_start.xml new file mode 100644 index 000000000..daba6f4c1 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_start.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_warn.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_warn.xml new file mode 100644 index 000000000..232fd0d07 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/bug455906_warn.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/corrupt.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/corrupt.xpi new file mode 100644 index 000000000..35d7bd5e5 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/corrupt.xpi @@ -0,0 +1 @@ +This is a corrupt zip file diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/corruptfile.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/corruptfile.xpi new file mode 100644 index 000000000..0c30989aa Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/corruptfile.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/empty.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/empty.xpi new file mode 100644 index 000000000..74ed2b817 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/empty.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/bootstrap.js new file mode 100644 index 000000000..1666f2972 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/bootstrap.js @@ -0,0 +1 @@ +Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/install.rdf new file mode 100644 index 000000000..f02a3869c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/from_sources/install.rdf @@ -0,0 +1,28 @@ + + + + + + bootstrap1@tests.mozilla.org + 1.0 + true + + + Test Bootstrap 1 + Test Description + + chrome://foo/skin/icon.png + chrome://foo/content/about.xul + chrome://foo/content/options.xul + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/pluginInfoURL_block.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/pluginInfoURL_block.xml new file mode 100644 index 000000000..75e252a46 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/pluginInfoURL_block.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + http://test.url.com/ + + + + + + + + + + http://alt.test.url.com/ + + + + + + + + + + + + http://test.url2.com/ + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.txt new file mode 100644 index 000000000..f17f98b15 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.txt @@ -0,0 +1 @@ +Not an xml file! \ No newline at end of file diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.xml new file mode 100644 index 000000000..0e3d415c4 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad2.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad2.xml new file mode 100644 index 000000000..55ad1c7d5 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/bad2.xml @@ -0,0 +1,3 @@ + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/empty.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/empty.xml new file mode 100644 index 000000000..42cb20bd0 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/empty.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/good.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/good.xml new file mode 100644 index 000000000..e1da86fa5 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/good.xml @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/missing.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/missing.xml new file mode 100644 index 000000000..8c9501478 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/missing.xml @@ -0,0 +1,3 @@ + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/unsigned.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/unsigned.xpi new file mode 100644 index 000000000..51b00475a Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/productaddons/unsigned.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/bootstrap.js new file mode 100644 index 000000000..0cf01d319 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/bootstrap.js @@ -0,0 +1,29 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +const VERSION = 1; + +// Test steps chain from pref observers on *_reason, +// so always set that last +function install(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", VERSION); + Services.prefs.setIntPref("bootstraptest.install_oldversion", data.oldVersion); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", VERSION); + Services.prefs.setIntPref("bootstraptest.startup_oldversion", data.oldVersion); + Services.prefs.setIntPref("bootstraptest.startup_reason", reason); +} + +function shutdown(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", 0); + Services.prefs.setIntPref("bootstraptest.shutdown_newversion", data.newVersion); + Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason); +} + +function uninstall(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", 0); + Services.prefs.setIntPref("bootstraptest.uninstall_newversion", data.newVersion); + Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason); +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/install.rdf new file mode 100644 index 000000000..9d08c357c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/install.rdf @@ -0,0 +1,24 @@ + + + + + + test@tests.mozilla.org + 1.0 + true + + + Test Add-on + http://localhost:4444/update.rdf + + + + xpcshell@tests.mozilla.org + 2 + 5 + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/test.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/test.txt new file mode 100644 index 000000000..11686f61c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_1/test.txt @@ -0,0 +1 @@ +This test file can be altered to break signing checks. diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/bootstrap.js new file mode 100644 index 000000000..718c82be4 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/bootstrap.js @@ -0,0 +1,29 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +const VERSION = 2; + +// Test steps chain from pref observers on *_reason, +// so always set that last +function install(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", VERSION); + Services.prefs.setIntPref("bootstraptest.install_oldversion", data.oldVersion); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", VERSION); + Services.prefs.setIntPref("bootstraptest.startup_oldversion", data.oldVersion); + Services.prefs.setIntPref("bootstraptest.startup_reason", reason); +} + +function shutdown(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", 0); + Services.prefs.setIntPref("bootstraptest.shutdown_newversion", data.newVersion); + Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason); +} + +function uninstall(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", 0); + Services.prefs.setIntPref("bootstraptest.uninstall_newversion", data.newVersion); + Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason); +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/install.rdf new file mode 100644 index 000000000..0a345dd92 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/install.rdf @@ -0,0 +1,24 @@ + + + + + + test@tests.mozilla.org + 2.0 + true + + + Test Add-on + http://localhost:4444/update.rdf + + + + xpcshell@tests.mozilla.org + 4 + 6 + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/test.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/test.txt new file mode 100644 index 000000000..11686f61c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/bootstrap_2/test.txt @@ -0,0 +1 @@ +This test file can be altered to break signing checks. diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_badid.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_badid.xpi new file mode 100644 index 000000000..9d6f0c708 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_badid.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_broken.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_broken.xpi new file mode 100644 index 000000000..4496a90cf Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_broken.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_good.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_good.xpi new file mode 100644 index 000000000..e61e3c721 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_good.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_hash.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_hash.xpi new file mode 100644 index 000000000..1682a7506 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_hash.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_plain.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_plain.xpi new file mode 100644 index 000000000..cd67e25fc Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_plain.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_hash.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_hash.xpi new file mode 100644 index 000000000..e4040a274 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_hash.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_plain.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_plain.xpi new file mode 100644 index 000000000..ca453b9d5 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_plain.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_65_hash.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_65_hash.xpi new file mode 100644 index 000000000..69579d2dc Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_65_hash.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_badid.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_badid.xpi new file mode 100644 index 000000000..6e23eb214 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_badid.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_broken.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_broken.xpi new file mode 100644 index 000000000..0ba0f30d1 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_broken.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_signed.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_signed.xpi new file mode 100644 index 000000000..33101f63c Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_signed.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_unsigned.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_unsigned.xpi new file mode 100644 index 000000000..3146870d8 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_unsigned.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/install.rdf new file mode 100644 index 000000000..97ae60988 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/install.rdf @@ -0,0 +1,23 @@ + + + + + + test@tests.mozilla.org + 1.0 + + + Test Add-on + http://localhost:4444/update.rdf + + + + xpcshell@tests.mozilla.org + 2 + 5 + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/test.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/test.txt new file mode 100644 index 000000000..11686f61c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_1/test.txt @@ -0,0 +1 @@ +This test file can be altered to break signing checks. diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/install.rdf new file mode 100644 index 000000000..df2fd8081 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/install.rdf @@ -0,0 +1,23 @@ + + + + + + test@tests.mozilla.org + 2.0 + + + Test Add-on + http://localhost:4444/update.rdf + + + + xpcshell@tests.mozilla.org + 4 + 6 + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/test.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/test.txt new file mode 100644 index 000000000..11686f61c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/nonbootstrap_2/test.txt @@ -0,0 +1 @@ +This test file can be altered to break signing checks. diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/preliminary_bootstrap_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/preliminary_bootstrap_2.xpi new file mode 100644 index 000000000..ec38fcc65 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/preliminary_bootstrap_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_1.xpi new file mode 100644 index 000000000..fc2842399 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_2.xpi new file mode 100644 index 000000000..327c8a187 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_badid_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_badid_2.xpi new file mode 100644 index 000000000..efad21d1b Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_badid_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_2.xpi new file mode 100644 index 000000000..d6ddbcec3 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_badid_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_badid_2.xpi new file mode 100644 index 000000000..5898d83e4 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_badid_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_bootstrap_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_bootstrap_2.xpi new file mode 100644 index 000000000..9d50f0825 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_bootstrap_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_nonbootstrap_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_nonbootstrap_2.xpi new file mode 100644 index 000000000..6ba1efd72 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_nonbootstrap_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/bootstrap.js new file mode 100644 index 000000000..1666f2972 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/bootstrap.js @@ -0,0 +1 @@ +Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1.xpi new file mode 100644 index 000000000..2fc2fd189 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1_badcert.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1_badcert.xpi new file mode 100644 index 000000000..e7e50c8ea Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_1_badcert.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_2.xpi new file mode 100644 index 000000000..a858cf74a Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system1_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_1.xpi new file mode 100644 index 000000000..911632e49 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_2.xpi new file mode 100644 index 000000000..102a053bb Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_3.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_3.xpi new file mode 100644 index 000000000..295e77611 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system2_3.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_1.xpi new file mode 100644 index 000000000..954995619 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_2.xpi new file mode 100644 index 000000000..dc8632aef Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_3.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_3.xpi new file mode 100644 index 000000000..3f818172a Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system3_3.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system4_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system4_1.xpi new file mode 100644 index 000000000..1f70b1a75 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system4_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system5_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system5_1.xpi new file mode 100644 index 000000000..fc636e97f Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system5_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_1_unpack.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_1_unpack.xpi new file mode 100644 index 000000000..ff620966d Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_1_unpack.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_2_notBootstrap.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_2_notBootstrap.xpi new file mode 100644 index 000000000..e474dbd59 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_2_notBootstrap.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_3_notMultiprocess.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_3_notMultiprocess.xpi new file mode 100644 index 000000000..1ccde90c5 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system6_3_notMultiprocess.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete.xpi new file mode 100644 index 000000000..94d9e47d2 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete_2.xpi new file mode 100644 index 000000000..28c8561c6 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_complete_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer.xpi new file mode 100644 index 000000000..daf55c0d4 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_2.xpi new file mode 100644 index 000000000..75cacbbc8 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also.xpi new file mode 100644 index 000000000..2eb6b7fc9 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also_2.xpi new file mode 100644 index 000000000..fb588b3e0 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_defer_also_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore.xpi new file mode 100644 index 000000000..7a5eb265d Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore_2.xpi new file mode 100644 index 000000000..dc6749355 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_delay_ignore_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_failed_update.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_failed_update.xpi new file mode 100644 index 000000000..3c673ac2e Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/system_addons/system_failed_update.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository.xml new file mode 100644 index 000000000..0bebca2c1 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository.xml @@ -0,0 +1,820 @@ + + + + + PASS + Extension + test1@tests.mozilla.org + 1.1 + + + Test Creator 1 + http://localhost:%PORT%/creator1.html + + + Preliminarily Reviewed + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + -2 + + + + -2 + http://localhost:%PORT%/test1.xpi + + + + + PASS + + Extension + test2@tests.mozilla.org + 1.2 + + + + Test Creator 2 + http://localhost:%PORT%/creator2.html + + + Test Developer 2 + http://localhost:%PORT%/developer2.html + + + <h1>Test Summary 2</h1><p>paragraph</p> + Test Description 2<br>newline + Test Developer + Comments 2 + Test EULA 2 + http://localhost:%PORT%/icon2-64.png + http://localhost:%PORT%/icon2-48.png + http://localhost:%PORT%/icon2-32.png + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + + http://localhost:%PORT%/full1-2.png + http://localhost:%PORT%/thumbnail1-2.png + + + http://localhost:%PORT%/full2-2.png + http://localhost:%PORT%/thumbnail2-2.png + Caption 2 + + + NaN + + http://localhost:%PORT%/learnmore2.html + + http://localhost:%PORT%/support2.html + + http://localhost:%PORT%/contribution2.html + http://localhost:%PORT%/meetDevelopers2.html + + http://localhost:%PORT%/review2.html + NaN + NaN + NaN + Not an acual date + http://localhost:%PORT%/test2.xpi + + + + + PASS + + Theme + test3@tests.mozilla.org + 1.3 + + + + + http://localhost:%PORT%/ignore3.html + + + + Test Creator Ignore + + + + Test Creator 3 + http://localhost:%PORT%/creator3.html + + + First Test Developer 3 + http://localhost:%PORT%/developer1-3.html + + + + + + + Second Test Developer 3 + http://localhost:%PORT%/developer2-3.html + + + Test Summary 3 + Test Description 3<br><ul><li>List item 1<li>List item 2</ul> + Test Developer Comments 3 + Test EULA 3 + http://localhost:%PORT%/icon3.png + Preliminarily Reviewed + + + + unknown@tests.mozilla.org + 1 + 1 + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + + http://localhost:%PORT%/full2-3.png + Caption 2 - 3 + + + + Caption ignore - 3 + + + + + Caption ignore - 3 + + http://localhost:%PORT%/full1-3.png + http://localhost:%PORT%/thumbnail1-3.png + Caption 1 - 3 + + + http://localhost:%PORT%/full3-3.png + http://localhost:%PORT%/thumbnail3-3.png + Caption 3 - 3 + + + + + 2 + + http://localhost:%PORT%/learnmore3.html + http://localhost:%PORT%/homepage3.html + http://localhost:%PORT%/support3.html + + http://localhost:%PORT%/contribution3.html + $11.11 + http://localhost:%PORT%/meetDevelopers3.html + + http://localhost:%PORT%/review3.html + 2222 + 3333 + 4444 + 2010-02-01T14:04:05Z + + http://localhost:%PORT%/fail3.xpi + + http://localhost:%PORT%/test3.xpi + + + + + Extension + test4@tests.mozilla.org + 1.4 + Test Creator 4 + Public + Add-on with undefined name should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test4.xpi + + + + + + Extension + test5@tests.mozilla.org + 1.5 + Test Creator 5 + Public + Add-on with empty name should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test5.xpi + + + + + FAIL + test6@tests.mozilla.org + 1.6 + Test Creator 6 + Public + Add-on with undefined type should be ignored + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test6.xpi + + + + + FAIL + Empty id attribute + test7@tests.mozilla.org + 1.7 + Test Creator 7 + Public + Add-on with empty type should be ignored + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test7.xpi + + + + + FAIL + Unknown + test8@tests.mozilla.org + 1.8 + Test Creator 8 + Public + Add-on with unknown type should be ignored + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test8.xpi + + + + + FAIL + Extension + 1.9 + Test Creator 9 + Public + Add-on with undefined guid should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test9.xpi + + + + + FAIL + Extension + + 1.10 + Test Creator 10 + Public + Add-on with empty guid should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test10.xpi + + + + + FAIL + Extension + test1@tests.mozilla.org + 1.11 + Test Creator 11 + Public + Add-on with a guid that matches a previously successful result should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test11.xpi + + + + + FAIL + Extension + test_AddonRepository_1@tests.mozilla.org + 1.12 + Test Creator 12 + Public + Add-on with a guid that matches an installed Addon should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test12.xpi + + + + + FAIL + Extension + test13@tests.mozilla.org + Test Creator 13 + Public + Add-on with undefined version should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test13.xpi + + + + + FAIL + Extension + test14@tests.mozilla.org + + Test Creator 14 + Public + Add-on with empty version should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test14.xpi + + + + + FAIL + Extension + test15@tests.mozilla.org + 1.15 + Public + Add-on with undefined authors should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test15.xpi + + + + + FAIL + Extension + test16@tests.mozilla.org + 1.16 + + Public + Add-on with no defined author elements should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test16.xpi + + + + + FAIL + Extension + test17@tests.mozilla.org + 1.17 + + + + + Public + Add-on with no non-empty author elements should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test17.xpi + + + + + FAIL + Extension + test18@tests.mozilla.org + 1.18 + Test Creator 18 + Add-on with undefined status should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test18.xpi + + + + + FAIL + Extension + test19@tests.mozilla.org + 1.19 + Test Creator 19 + Unknown + Add-on with non-Public status should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test19.xpi + + + + + FAIL + Extension + test20@tests.mozilla.org + 1.20 + Test Creator 20 + Public + Add-on with undefined compatible_applications should be ignored. + http://localhost:%PORT%/test20.xpi + + + + + FAIL + Extension + test21@tests.mozilla.org + 1.21 + Test Creator 21 + Public + Add-on with no compatible applications should be ignored. + + + unknown@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test21.xpi + + + + + FAIL + Extension + test22@tests.mozilla.org + 1.22 + Test Creator 22 + Public + Add-on with too high of a compatible application min version should be ignored. + + + xpcshell@tests.mozilla.org + 2.0 + + + http://localhost:%PORT%/test22.xpi + + + + + FAIL + Extension + test23@tests.mozilla.org + 1.23 + Test Creator 23 + Public + Add-on with too high of a compatible application min version should be ignored. + + + xpcshell@tests.mozilla.org + 1.1 + 2.0 + + + http://localhost:%PORT%/test23.xpi + + + + + FAIL + Extension + test24@tests.mozilla.org + 1.24 + Test Creator 24 + Public + Add-on with too low of a compatible application max version should be ignored. + + + xpcshell@tests.mozilla.org + 0.9 + + + http://localhost:%PORT%/test24.xpi + + + + + FAIL + Extension + test25@tests.mozilla.org + 1.25 + Test Creator 25 + Public + Add-on with too low of a compatible application max version should be ignored. + + + xpcshell@tests.mozilla.org + 0.9 + 0.9.9 + + + http://localhost:%PORT%/test25.xpi + + + + + FAIL + Extension + test26@tests.mozilla.org + 1.26 + Test Creator 26 + Public + Add-on with undefined XPI URL should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + + + FAIL + Extension + test27@tests.mozilla.org + 1.27 + Test Creator 27 + Public + Add-on with an empty XPI URL should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + + + + FAIL + Extension + test28@tests.mozilla.org + 1.28 + Test Creator 28 + Public + Add-on with no installs with compatible OS should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test28.xpi + http://localhost:%PORT%/test28.xpi + + + + + FAIL + Extension + test29@tests.mozilla.org + 1.29 + Test Creator 29 + Public + Add-on with an XPI URL that matches an installing AddonInstall should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/addons/test_AddonRepository_2.xpi + + + + + PASS + Extension + purchase1@tests.mozilla.org + 2.0 + + + Test Creator - Last Passing + http://localhost:%PORT%/creatorLastPassing.html + + + Public + + ALL + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + 5 + + http://localhost:%PORT%/purchaseURL1 + $5 + + + + + + PASS + Extension + purchase2@tests.mozilla.org + 2.0 + + + Test Creator - Last Passing + http://localhost:%PORT%/creatorLastPassing.html + + + Public + + XPCShell + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + 5 + + http://localhost:%PORT%/purchaseURL2 + $10 + + + + + + FAIL + Extension + purchase3@tests.mozilla.org + 2.0 + + + Test Creator - Last Passing + http://localhost:%PORT%/creatorLastPassing.html + + + Public + + FOO + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + 5 + + http://localhost:%PORT%/purchaseURL3 + $10 + + + + + + PASS + Extension + test-lastPassing@tests.mozilla.org + 2.0 + + + Test Creator - Last Passing + http://localhost:%PORT%/creatorLastPassing.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + 10 + http://localhost:%PORT%/addons/test_AddonRepository_3.xpi + + + + + FAIL + Extension + test-surpassesLimit@tests.mozilla.org + 9.9 + Test Creator - Surpasses Limit + Public + Add-on should not be added because doing so would surpass MAX_RESULTS limit + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test-surpassesLimit.xpi + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_cache.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_cache.xml new file mode 100644 index 000000000..f707f1217 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_cache.xml @@ -0,0 +1,182 @@ + + + + Repo Add-on 1 + Extension + test_AddonRepository_1@tests.mozilla.org + 2.1 + + + Repo Add-on 1 - Creator + http://localhost:4444/repo/1/creator.html + + + Repo Add-on 1 - First Developer + http://localhost:4444/repo/1/firstDeveloper.html + + + Repo Add-on 1 - Second Developer + http://localhost:4444/repo/1/secondDeveloper.html + + + Repo Add-on 1 - Description<br>Second line + <p>Repo Add-on 1 - Full Description &amp; some extra</p> + Repo Add-on 1 - EULA + Repo Add-on 1 + Developer Comments + http://localhost/repo/1/icon.png + Public + 1 + http://localhost/repo/1/learnmore.html + http://localhost/repo/1/homepage.html + http://localhost/repo/1/support.html + + http://localhost/repo/1/contribution.html + $11.11 + http://localhost/repo/1/meetDevelopers.html + + http://localhost/repo/1/review.html + 2221 + 3331 + 4441 + 1970-01-01T00:00:09Z + http://localhost:4444/repo/1/install.xpi + + + + Repo Add-on 2 + Theme + test_AddonRepository_2@tests.mozilla.org + 2.2 + + + Repo Add-on 2 - Creator + http://localhost:4444/repo/2/creator.html + + + Repo Add-on 2 - First Developer + http://localhost:4444/repo/2/firstDeveloper.html + + + Repo Add-on 2 - Second Developer + http://localhost:4444/repo/2/secondDeveloper.html + + + Repo Add-on 2 - Description + Repo Add-on 2 - Full Description + Repo Add-on 2 - EULA + Repo Add-on 2 - Developer Comments + http://localhost/repo/2/icon.png + Unknown + + + http://localhost:4444/repo/2/firstFull.png + http://localhost:4444/repo/2/firstThumbnail.png + Repo Add-on 2 - First Caption + + + http://localhost:4444/repo/2/secondFull.png + http://localhost:4444/repo/2/secondThumbnail.png + Repo Add-on 2 - Second Caption + + + 2 + http://localhost/repo/2/learnmore.html + http://localhost/repo/2/homepage.html + http://localhost/repo/2/support.html + + http://localhost/repo/2/contribution.html + http://localhost/repo/2/meetDevelopers.html + + http://localhost/repo/2/review.html + 2222 + 3332 + 4442 + 1970-01-01T00:00:09Z + http://localhost:4444/repo/2/install.xpi + + + + Repo Add-on 3 + Theme + test_AddonRepository_3@tests.mozilla.org + 2.3 + http://localhost/repo/3/icon.png + + + http://localhost:4444/repo/3/firstFull.png + http://localhost:4444/repo/3/firstThumbnail.png + Repo Add-on 3 - First Caption + + + http://localhost:4444/repo/3/secondFull.png + http://localhost:4444/repo/3/secondThumbnail.png + Repo Add-on 3 - Second Caption + + + + + + test_AddonRepository_1@tests.mozilla.org + PASS + + + + 0.1 + 0.2 + + + XPCShell + 666 + 3.0 + 4.0 + xpcshell@tests.mozilla.org + + + + + + 0.2 + 0.3 + + + XPCShell + 666 + 5.0 + 6.0 + xpcshell@tests.mozilla.org + + + + + + 9 + 10 + + + XPCShell + 666 + 10.0 + 11.0 + xpcshell@tests.mozilla.org + + + + + + 0.2 + 0.3 + + + Unknown App + 123 + 1.0 + 999.0 + unknown-app@tests.mozilla.org + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_ignore.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_ignore.xml new file mode 100644 index 000000000..003095727 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_ignore.xml @@ -0,0 +1,23 @@ + + + + Test Repo Add-on - ignore + Extension + compatmode-ignore@tests.mozilla.org + 1.1 + + + Test Creator 1 + http://localhost:%PORT%/creator1.html + + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test1.xpi + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_normal.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_normal.xml new file mode 100644 index 000000000..fec8b09ca --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_normal.xml @@ -0,0 +1,23 @@ + + + + Test Repo Add-on - normal + Extension + compatmode-normal@tests.mozilla.org + 1.1 + + + Test Creator 1 + http://localhost:%PORT%/creator1.html + + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test1.xpi + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_strict.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_strict.xml new file mode 100644 index 000000000..f99256b87 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_compatmode_strict.xml @@ -0,0 +1,23 @@ + + + + Test Repo Add-on - strict + Extension + compatmode-strict@tests.mozilla.org + 1.1 + + + Test Creator 1 + http://localhost:%PORT%/creator1.html + + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test1.xpi + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_empty.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_empty.xml new file mode 100644 index 000000000..4cd5c1443 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_empty.xml @@ -0,0 +1,3 @@ + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_failed.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_failed.xml new file mode 100644 index 000000000..d02fa0249 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_failed.xml @@ -0,0 +1,21 @@ + + + + + PASS + Extension + test1@tests.mozilla.org + 1.1 + Test Creator 1 + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test1.xpi + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml new file mode 100644 index 000000000..8a6167969 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_AddonRepository_getAddonsByIDs.xml @@ -0,0 +1,187 @@ + + + + + PASS + Extension + test1@tests.mozilla.org + 1.1 + + + Test Creator 1 + http://localhost:%PORT%/creator1.html + + + Test Developer 1 + http://localhost:%PORT%/developer1.html + + + Test Summary 1 + Test Description 1 + Test EULA 1 + Test Developer Comments 1 + http://localhost:%PORT%/icon1.png + Preliminarily Reviewed + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + + http://localhost:%PORT%/full1-1.png + + + http://localhost:%PORT%/thumbnail1-1.png + + Caption 1 - 1 + + + http://localhost:%PORT%/full2-1.png + http://localhost:%PORT%/thumbnail2-1.png + Caption 2 - 1 + + + 4 + http://localhost:%PORT%/learnmore1.html + http://localhost:%PORT%/support1.html + + http://localhost:%PORT%/contribution1.html + $11.11 + http://localhost:%PORT%/meetDevelopers1.html + + http://localhost:%PORT%/review1.html + 2222 + 3333 + 4444 + 2010-02-01T14:04:05Z + http://localhost:%PORT%/addons/test_AddonRepository_2.xpi + + + + test1@tests.mozilla.org + PASS + + + + 0.1 + 0.2 + + + XPCShell + 666 + 3.0 + 4.0 + xpcshell@tests.mozilla.org + + + + + + 0.2 + 0.3 + + + XPCShell + 666 + 5.0 + 6.0 + xpcshell@tests.mozilla.org + + + + + + 9 + 10 + + + XPCShell + 666 + 10.0 + 11.0 + xpcshell@tests.mozilla.org + + + + + + 0.2 + 0.3 + + + Unknown App + 123 + 1.0 + 999.0 + unknown-app@tests.mozilla.org + + + + + + + + + FAIL + Extension + test1@tests.mozilla.org + 1.2 + Test Creator 2 + Public + Add-on with a guid that matches a previously successful result should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test2.xpi + + + + + FAIL + Extension + notRequested@tests.mozilla.org + 1.3 + Test Creator 3 + Public + Add-on with a guid that wasn't requested should be ignored. + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test3.xpi + + + + + PASS + Theme + test_AddonRepository_1@tests.mozilla.org + 1.4 + Unknown + + + unknown@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test4.xpi + http://localhost:%PORT%/test4.xpi + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_backgroundupdate.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_backgroundupdate.rdf new file mode 100644 index 000000000..ab7cdef34 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_backgroundupdate.rdf @@ -0,0 +1,70 @@ + + + + + + + + + + + 2 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/broken.xpi + + + + + + + + + + + + + + + 2 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/broken.xpi + + + + + + + + + + + + + + + 2 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/broken.xpi + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml new file mode 100644 index 000000000..368a6ed53 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_metadata_filters_1.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_prefs_1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_prefs_1.xml new file mode 100644 index 000000000..41df457b0 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_prefs_1.xml @@ -0,0 +1,28 @@ + + + + + + + test.blocklist.pref1 + test.blocklist.pref2 + + + + + + + + + + test.blocklist.pref3 + test.blocklist.pref4 + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_regexp_1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_regexp_1.xml new file mode 100644 index 000000000..20035c6a2 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_blocklist_regexp_1.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716.rdf new file mode 100644 index 000000000..d60d8ca3f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716.rdf @@ -0,0 +1,181 @@ + + + + 0.2"> + + xpcshell@tests.mozilla.org + 5 + 5 + "> + + toolkit@mozilla.org + 1.9 + 1.9 + "> + + 30 + 30 + "> + + xpcshell@tests.mozilla.org + &invalidRange; + "> + + toolkit@mozilla.org + &invalidRange; + "> +]> + + + + + + + + + + + + &v0.2; + + + &xpcshell.app; + + + + + + + + + + + + + + + &v0.2; + + + &toolkit.app; + + + + + + + + + + + + + + + &v0.2; + + + &xpcshell.app; + + + + + &toolkit.app; + + + + + + + + + + + + + + + &v0.2; + + + &xpcshell.app; + + + + + &toolkit.invalid; + + + + + + + + + + + + + + + &v0.2; + + + &xpcshell.invalid; + + + + + &toolkit.app; + + + + + + + + + + + + + + + &v0.2; + + + &xpcshell.invalid; + + + + + &toolkit.invalid; + + + + + + + + + + + + + + + &v0.2; + + + &toolkit.invalid; + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716_2.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716_2.rdf new file mode 100644 index 000000000..94a4ea450 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug299716_2.rdf @@ -0,0 +1,23 @@ + + + + + + + + + 0.1 + + + toolkit@mozilla.org + 1.9 + 2.0.* + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug324121.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug324121.rdf new file mode 100644 index 000000000..2c453f756 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug324121.rdf @@ -0,0 +1,91 @@ + + + + + + + + + + + 2 + + + xpcshell@tests.mozilla.org + 3 + 3 + http://localhost:4444/broken.xpi + + + + + + + + + + + + + + + 2 + + + xpcshell@tests.mozilla.org + 2 + 2 + http://localhost:4444/broken.xpi + + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 3 + 3 + http://localhost:4444/broken.xpi + + + + + + + + + + + + + + + 2 + + + toolkit@mozilla.org + 2 + 2 + http://localhost:4444/broken.xpi + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug393285.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug393285.xml new file mode 100644 index 000000000..1767b4332 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug393285.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug394300.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug394300.rdf new file mode 100644 index 000000000..94e12527f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug394300.rdf @@ -0,0 +1,159 @@ + + + + + + + + + + + 20 + + + xpcshell@tests.mozilla.org + 2 + 2 + http://localhost:4444/broken.xpi + + + + + + + + 10 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/broken.xpi + + + + + + + + 6 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/broken.xpi + + + + + + + + 40 + + + xpcshell@tests.mozilla.org + http://localhost:4444/broken.xpi + + + + + + + + 30 + + + xpcshell@tests.mozilla.org + 2 + 2 + http://localhost:4444/broken.xpi + + + + + + + + + + + + + + + 20 + + + toolkit@mozilla.org + 2 + 2 + http://localhost:4444/broken.xpi + + + + + + + + 10 + + + toolkit@mozilla.org + 1.9 + 1.9 + http://localhost:4444/broken.xpi + + + + + + + + 6 + + + toolkit@mozilla.org + 1.9 + 1.9 + http://localhost:4444/broken.xpi + + + + + + + + 40 + + + toolkit@mozilla.org + http://localhost:4444/broken.xpi + + + + + + + + 30 + + + toolkit@mozilla.org + 2 + 2 + http://localhost:4444/broken.xpi + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug424262.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug424262.xml new file mode 100644 index 000000000..d797debbb --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug424262.xml @@ -0,0 +1,185 @@ + + + + TEST + Extension + test1@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + -5 + Extension + test2@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + 0 + Extension + test3@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + 2 + Extension + test4@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + 4 + Extension + test5@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + 5 + Extension + test6@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + 10 + Extension + test7@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + TEST + 100 + Extension + test8@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_app.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_app.xml new file mode 100644 index 000000000..f12ca1fa6 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_app.xml @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_toolkit.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_toolkit.xml new file mode 100644 index 000000000..ad8ec5ed9 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug449027_toolkit.xml @@ -0,0 +1,208 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug468528.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug468528.xml new file mode 100644 index 000000000..85f0da57c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug468528.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_1.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_1.rdf new file mode 100644 index 000000000..5397e8a87 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_1.rdf @@ -0,0 +1,17 @@ + + + + + bug470377_1@tests.mozilla.org + 1 + + + unknown@tests.mozilla.org + 1 + 1 + + + Test for Bug 470377 + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_2.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_2.rdf new file mode 100644 index 000000000..b1dde7f7a --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_2.rdf @@ -0,0 +1,17 @@ + + + + + bug470377_2@tests.mozilla.org + 1 + + + toolkit@mozilla.org + 1 + 1 + + + Test for Bug 470377 + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_3.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_3.rdf new file mode 100644 index 000000000..ae483434a --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_3.rdf @@ -0,0 +1,17 @@ + + + + + bug470377_3@tests.mozilla.org + 1 + + + xpcshell@tests.mozilla.org + 1 + 1 + + + Test for Bug 470377 + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_4.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_4.rdf new file mode 100644 index 000000000..97abacc5e --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_4.rdf @@ -0,0 +1,17 @@ + + + + + bug470377_4@tests.mozilla.org + 1 + + + toolkit@mozilla.org + 1 + 2 + + + Test for Bug 470377 + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_5.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_5.rdf new file mode 100644 index 000000000..bff1104a7 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/install_5.rdf @@ -0,0 +1,17 @@ + + + + + bug470377_5@tests.mozilla.org + 1 + + + xpcshell@tests.mozilla.org + 1 + 3 + + + Test for Bug 470377 + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_1.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_1.rdf new file mode 100644 index 000000000..e4ad91ae9 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_1.rdf @@ -0,0 +1,26 @@ + + + + + + + + + + 1 + + + unknown@tests.mozilla.org + 1 + 2 + http://localhost:%PORT%/broken.xpi + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_2.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_2.rdf new file mode 100644 index 000000000..10fcafd39 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_2.rdf @@ -0,0 +1,26 @@ + + + + + + + + + + 1 + + + toolkit@mozilla.org + 1 + 1 + http://localhost:%PORT%/broken.xpi + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_3.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_3.rdf new file mode 100644 index 000000000..684002462 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_3.rdf @@ -0,0 +1,26 @@ + + + + + + + + + + 1 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/broken.xpi + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_4.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_4.rdf new file mode 100644 index 000000000..6e7116239 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_4.rdf @@ -0,0 +1,26 @@ + + + + + + + + + + 1 + + + toolkit@mozilla.org + 1 + 2 + http://localhost:%PORT%/broken.xpi + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_5.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_5.rdf new file mode 100644 index 000000000..c926af934 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug470377/update_5.rdf @@ -0,0 +1,26 @@ + + + + + + + + + + 1 + + + xpcshell@tests.mozilla.org + 1 + 3 + http://localhost:%PORT%/broken.xpi + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_1.xml new file mode 100644 index 000000000..c4cc2fe37 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_1.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_2.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_2.xml new file mode 100644 index 000000000..cc0a0c69d --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_2.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_empty.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_empty.xml new file mode 100644 index 000000000..0261794f8 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_empty.xml @@ -0,0 +1,4 @@ + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml new file mode 100644 index 000000000..d651f8799 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml new file mode 100644 index 000000000..208444681 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug514327_3_outdated_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_1.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_1.xpi new file mode 100644 index 000000000..2dbcc0b50 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_1.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_2.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_2.xpi new file mode 100644 index 000000000..86fc6baaa Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug526598_2.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug541420.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug541420.xpi new file mode 100644 index 000000000..adb7be9ad Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug541420.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug542391.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug542391.rdf new file mode 100644 index 000000000..db82cf675 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug542391.rdf @@ -0,0 +1,25 @@ + + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 1 + 3 + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug554133.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug554133.xml new file mode 100644 index 000000000..736c10514 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug554133.xml @@ -0,0 +1,292 @@ + + + + PASS + Extension + test1@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + FAIL + Extension + test2@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + Should not return an incompatible add-on + + + xpcshell@tests.mozilla.org + 2 + 2 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test3@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + FAIL + Extension + test4@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + Should not return an add-on for a different OS + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test5@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + FAIL + Extension + test5@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + Should not include the same result twice + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test6@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test7@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test8@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test9@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test10@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test11@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + + PASS + Extension + test12@tests.mozilla.org + 1.0 + + + Test Creator + http://localhost:%PORT%/creator.html + + + Public + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://localhost:%PORT%/test.xpi + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug619730.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug619730.xml new file mode 100644 index 000000000..f2511c0de --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug619730.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug655254.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug655254.rdf new file mode 100644 index 000000000..9857dcb55 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_bug655254.rdf @@ -0,0 +1,26 @@ + + + + + + + + + + 1 + + + xpcshell@tests.mozilla.org + 1 + 2 + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_compatoverrides.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_compatoverrides.xml new file mode 100644 index 000000000..c0d67d033 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_compatoverrides.xml @@ -0,0 +1,228 @@ + + + + Test addon 2 + Extension + addon2@tests.mozilla.org + 1.0 + + + + Test addon 3 + Extension + addon3@tests.mozilla.org + 1.0 + + + Test addon 3 + addon3@tests.mozilla.org + + + 0.9 + 1.0 + + + XPCShell + xpcshell@tests.mozilla.org + 1 + 2 + + + + + + + + Test addon 4 + Extension + addon4@tests.mozilla.org + 1.0 + + + Test addon 4 + addon4@tests.mozilla.org + + + 0.9 + 1.0 + + + XPCShell + xpcshell@tests.mozilla.org + 1 + 2 + + + + + + + + Test addon 5 + Extension + addon5@tests.mozilla.org + 1.0 + + + Test addon 5 + addon5@tests.mozilla.org + + + 0.9 + 1.0 + + + Unknown App + unknown-app@tests.mozilla.org + 1 + 2 + + + + + + + + Test addon 6 + Extension + addon6@tests.mozilla.org + 1.0 + + + Test addon 6 + addon6@tests.mozilla.org + + + 0.5 + 0.9 + + + XPCShell + xpcshell@tests.mozilla.org + 1 + 2 + + + + + + + + Test addon 7 + Extension + addon7@tests.mozilla.org + 1.0 + + + Test addon 7 + addon7@tests.mozilla.org + + + 0.5 + 1.0 + + + XPCShell + xpcshell@tests.mozilla.org + 0.1 + 0.9 + + + + + + + + Test addon 8 + Extension + addon8@tests.mozilla.org + 1.0 + + + Test addon 8 + addon8@tests.mozilla.org + + + 6 + 6.2 + + + XPCShell + xpcshell@tests.mozilla.org + 0.9 + 9 + + + + + 0.5 + 1.0 + + + XPCShell + xpcshell@tests.mozilla.org + 0.1 + 9 + + + Unknown app + unknown-app@tests.mozilla.org + 0.1 + 9 + + + + + 0.1 + 0.2 + + + XPCShell + xpcshell@tests.mozilla.org + 0.1 + 0.9 + + + + + + + + Test addon 9 + addon9@tests.mozilla.org + + + 0.5 + 1.0 + + + XPCShell + xpcshell@tests.mozilla.org + 1 + 2 + + + + + + + + Test addon 10 + addon10@tests.mozilla.org + + + 0.5 + 1.0 + + + XPCShell + xpcshell@tests.mozilla.org + 1 + 2 + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_corrupt.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_corrupt.rdf new file mode 100644 index 000000000..f3341bdcf --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_corrupt.rdf @@ -0,0 +1,44 @@ + + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + + + +
  • +
    +
    +
    + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_complete/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_complete/bootstrap.js new file mode 100644 index 000000000..a81c90bf0 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_complete/bootstrap.js @@ -0,0 +1,24 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); +Components.utils.import("resource://gre/modules/AddonManager.jsm"); + +const ADDON_ID = "test_delay_update_complete@tests.mozilla.org"; +const INSTALL_COMPLETE_PREF = "bootstraptest.install_complete_done"; + +function install(data, reason) {} + +// normally we would use BootstrapMonitor here, but we need a reference to +// the symbol inside `XPIProvider.jsm`. +function startup(data, reason) { + // apply update immediately + if (data.hasOwnProperty("instanceID") && data.instanceID) { + AddonManager.addUpgradeListener(data.instanceID, (upgrade) => { + upgrade.install(); + }); + } else { + throw Error("no instanceID passed to bootstrap startup"); + } +} + +function shutdown(data, reason) {} + +function uninstall(data, reason) {} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_defer/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_defer/bootstrap.js new file mode 100644 index 000000000..25ffd8565 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_defer/bootstrap.js @@ -0,0 +1,34 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); +Components.utils.import("resource://gre/modules/AddonManager.jsm"); + +const ADDON_ID = "test_delay_update_complete@tests.mozilla.org"; +const INSTALL_COMPLETE_PREF = "bootstraptest.install_complete_done"; + +// global reference to hold upgrade object +let gUpgrade; + +function install(data, reason) {} + +// normally we would use BootstrapMonitor here, but we need a reference to +// the symbol inside `XPIProvider.jsm`. +function startup(data, reason) { + // do not apply update immediately, hold on to for later + if (data.hasOwnProperty("instanceID") && data.instanceID) { + AddonManager.addUpgradeListener(data.instanceID, (upgrade) => { + gUpgrade = upgrade; + }); + } else { + throw Error("no instanceID passed to bootstrap startup"); + } + + // add a listener so the test can pass control back + AddonManager.addAddonListener({ + onFakeEvent: () => { + gUpgrade.install(); + } + }) +} + +function shutdown(data, reason) {} + +function uninstall(data, reason) {} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_ignore/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_ignore/bootstrap.js new file mode 100644 index 000000000..7693c9c2d --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_update_ignore/bootstrap.js @@ -0,0 +1,26 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); +Components.utils.import("resource://gre/modules/AddonManager.jsm"); + +const ADDON_ID = "test_delay_update_ignore@tests.mozilla.org"; +const TEST_IGNORE_PREF = "delaytest.ignore"; + +function install(data, reason) {} + +// normally we would use BootstrapMonitor here, but we need a reference to +// the symbol inside `XPIProvider.jsm`. +function startup(data, reason) { + Services.prefs.setBoolPref(TEST_IGNORE_PREF, false); + + // explicitly ignore update, will be queued for next restart + if (data.hasOwnProperty("instanceID") && data.instanceID) { + AddonManager.addUpgradeListener(data.instanceID, (upgrade) => { + Services.prefs.setBoolPref(TEST_IGNORE_PREF, true); + }); + } else { + throw Error("no instanceID passed to bootstrap startup"); + } +} + +function shutdown(data, reason) {} + +function uninstall(data, reason) {} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.json b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.json new file mode 100644 index 000000000..cf3defdc7 --- /dev/null +++ b/toolkit/mozapps/webextensions/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://localhost:%PORT%/addons/test_delay_update_complete_webextension_v2.xpi" + } + ] + } + } +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.rdf new file mode 100644 index 000000000..8af39cb0e --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_complete.rdf @@ -0,0 +1,26 @@ + + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_delay_update_complete_v2.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.json b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.json new file mode 100644 index 000000000..2fcab10b5 --- /dev/null +++ b/toolkit/mozapps/webextensions/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://localhost:%PORT%/addons/test_delay_update_defer_webextension_v2.xpi" + } + ] + } + } +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.rdf new file mode 100644 index 000000000..d44d4880f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_defer.rdf @@ -0,0 +1,26 @@ + + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_delay_update_defer_v2.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.json b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.json new file mode 100644 index 000000000..b7f48149d --- /dev/null +++ b/toolkit/mozapps/webextensions/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://localhost:%PORT%/addons/test_delay_update_ignore_webextension_v2.xpi" + } + ] + } + } +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.rdf new file mode 100644 index 000000000..866884f8d --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_delay_updates_ignore.rdf @@ -0,0 +1,26 @@ + + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_delay_update_ignore_v2.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_dictionary.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_dictionary.rdf new file mode 100644 index 000000000..364b3bba1 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_dictionary.rdf @@ -0,0 +1,65 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_dictionary_3.xpi + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_dictionary_4.xpi + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_dictionary_5.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/bootstrap.js new file mode 100644 index 000000000..01682d3b7 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/bootstrap.js @@ -0,0 +1,21 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +function install(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", 2); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", 2); + Services.prefs.setIntPref("bootstraptest.startup_reason", reason); +} + +function shutdown(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", 0); + Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason); +} + +function uninstall(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", 0); + Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason); +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/install.rdf new file mode 100644 index 000000000..ebe547ccc --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/install.rdf @@ -0,0 +1,23 @@ + + + + + + addon2@tests.mozilla.org + 2.0 + + + Distributed add-ons test + true + + + + xpcshell@tests.mozilla.org + 1 + 5 + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/dummy.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/dummy.txt new file mode 100644 index 000000000..051aef85a --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/dummy.txt @@ -0,0 +1 @@ +Test of a file in a sub directory \ No newline at end of file diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/subdir2/dummy2.txt b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/subdir2/dummy2.txt new file mode 100644 index 000000000..9eddc4493 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_distribution2_2/subdir/subdir2/dummy2.txt @@ -0,0 +1 @@ +Nested dummy file \ No newline at end of file diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist.xml new file mode 100644 index 000000000..d535d2c3f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist.xml @@ -0,0 +1,304 @@ + + + + + + WINNT 6.1 + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + LESS_THAN + + + WINNT 6.0 + 0xdcba + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_9_LAYERS + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + LESS_THAN + + + WINNT 6.1 + 0xabab + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + GREATER_THAN_OR_EQUAL + + + WINNT 6.1 + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + 8.52.322.1111 + EQUAL + + + Darwin 13 + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + + + Linux + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + + + Android + abcd + + wxyz + asdf + erty + + DIRECT2D + BLOCKED_DRIVER_VERSION + 5 + LESS_THAN_OR_EQUAL + + + Android + dcdc + + uiop + vbnm + hjkl + + DIRECT2D + BLOCKED_DRIVER_VERSION + 5 + EQUAL + + + Android + abab + + ghjk + cvbn + + DIRECT2D + BLOCKED_DRIVER_VERSION + 7 + GREATER_THAN_OR_EQUAL + + + WINNT 6.1 + 0xabcd + + 0x6666 + + DIRECT2D + BLOCKED_DEVICE + + + Darwin 13 + 0xabcd + + 0x6666 + + DIRECT2D + BLOCKED_DEVICE + + + Linux + 0xabcd + + 0x6666 + + DIRECT2D + BLOCKED_DEVICE + + + Android + 0xabcd + + 0x6666 + + DIRECT2D + BLOCKED_DEVICE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_LAYERS + BLOCKED_DRIVER_VERSION + 8.52.322.1112 + 8.52.323.1000 + BETWEEN_EXCLUSIVE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + OPENGL_LAYERS + BLOCKED_DRIVER_VERSION + 8.50.322.1000 + 8.52.322.1112 + BETWEEN_EXCLUSIVE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_ANGLE + BLOCKED_DRIVER_VERSION + 8.52.322.1000 + 9.52.322.1000 + BETWEEN_EXCLUSIVE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + HARDWARE_VIDEO_DECODING + BLOCKED_DRIVER_VERSION + 7.82.322.1000 + 9.25.322.1001 + BETWEEN_INCLUSIVE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION + BLOCKED_DRIVER_VERSION + 8.52.322.1112 + 9.52.322.1300 + BETWEEN_INCLUSIVE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_DECODE + BLOCKED_DRIVER_VERSION + 8.52.322.1000 + 8.52.322.1112 + BETWEEN_INCLUSIVE + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_ENCODE + BLOCKED_DRIVER_VERSION + 8.52.322.1112 + 8.52.322.1200 + BETWEEN_INCLUSIVE_START + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_MSAA + BLOCKED_DRIVER_VERSION + 8.52.322.1000 + 8.52.322.1200 + BETWEEN_INCLUSIVE_START + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_ANGLE + BLOCKED_DRIVER_VERSION + 8.52.322.1000 + 8.52.322.1112 + BETWEEN_INCLUSIVE_START + + + + All + 0xdcdc + + 0x2783 + 0x1234 + 0x2782 + + CANVAS2D_ACCELERATION + BLOCKED_DRIVER_VERSION + 8.52.322.1000 + 9.52.322.1000 + BETWEEN_EXCLUSIVE + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist2.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist2.xml new file mode 100644 index 000000000..0ad8f6819 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist2.xml @@ -0,0 +1,31 @@ + + + + + + WINNT 6.1 + 0xabcd + + 0x2783 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + LESS_THAN + + + WINNT 6.0 + 0xdcba + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_9_LAYERS + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + LESS_THAN + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml new file mode 100644 index 000000000..f64676355 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_AllOS.xml @@ -0,0 +1,783 @@ + + + + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_9_LAYERS + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_LAYERS + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_1_LAYERS + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + OPENGL_LAYERS + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_OPENGL + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_ANGLE + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_MSAA + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + STAGEFRIGHT + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_ENCODE + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_DECODE + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_LAYERS + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + HARDWARE_VIDEO_DECODING + BLOCKED_DRIVER_VERSION + + + + All + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_ANGLE + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_9_LAYERS + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_LAYERS + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_1_LAYERS + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + OPENGL_LAYERS + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_OPENGL + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_ANGLE + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_MSAA + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + STAGEFRIGHT + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_ENCODE + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_DECODE + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_LAYERS + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + HARDWARE_VIDEO_DECODING + BLOCKED_DRIVER_VERSION + + + + Darwin 13 + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_ANGLE + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_9_LAYERS + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_LAYERS + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_1_LAYERS + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + OPENGL_LAYERS + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_OPENGL + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_ANGLE + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_MSAA + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + STAGEFRIGHT + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_ENCODE + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_DECODE + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_LAYERS + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + HARDWARE_VIDEO_DECODING + BLOCKED_DRIVER_VERSION + + + + Linux + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_ANGLE + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_9_LAYERS + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_LAYERS + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_10_1_LAYERS + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + OPENGL_LAYERS + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_OPENGL + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_ANGLE + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBGL_MSAA + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + STAGEFRIGHT + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_ENCODE + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + WEBRTC_HW_ACCELERATION_DECODE + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_LAYERS + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + HARDWARE_VIDEO_DECODING + BLOCKED_DRIVER_VERSION + + + + Android + 0xabcd + + + 0x2783 + 0x1234 + 0x2782 + + DIRECT3D_11_ANGLE + BLOCKED_DRIVER_VERSION + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.xml new file mode 100644 index 000000000..248868a2e --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_gfxBlacklist_OSVersion.xml @@ -0,0 +1,32 @@ + + + + + + WINNT 6.2 + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + DIRECT2D + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + LESS_THAN + + + Darwin 13 + 0xabcd + + 0x2783 + 0x1234 + 0x2782 + + OPENGL_LAYERS + BLOCKED_DRIVER_VERSION + 8.52.322.2202 + LESS_THAN + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_1.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_1.rdf new file mode 100644 index 000000000..016726021 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_1.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_hotfix_1.xpi + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_2.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_2.rdf new file mode 100644 index 000000000..35a2befee --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_2.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_hotfix_2.xpi + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_3.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_3.rdf new file mode 100644 index 000000000..7180da143 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_hotfix_3.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 3.0 + + + xpcshell@tests.mozilla.org + 2 + 2 + http://localhost:%PORT%/addons/test_hotfix_3.xpi + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_install.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_install.rdf new file mode 100644 index 000000000..fe82334fa --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_install.rdf @@ -0,0 +1,63 @@ + + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0 + 1 + + + +
  • +
    +
    +
    + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0 + 1 + + + +
  • +
    +
    +
    + + + + +
  • + + 5.0 + + + xpcshell@tests.mozilla.org + 0 + 1 + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_install.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_install.xml new file mode 100644 index 000000000..33f14a2fd --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_install.xml @@ -0,0 +1,53 @@ + + + + Real Test 2 + Extension + addon2@tests.mozilla.org + 1.0 + + + Test Creator + http://example.com/creator.html + + + Public + Repository summary + Repository description + + + Firefox + {ec8030f7-c20a-464f-9b0e-13a3a9e97384} + 0 + * + + + SeaMonkey + {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a} + 0 + * + + + ALL + http://example.com/browser/toolkit/mozapps/extensions/test/browser/addons/browser_install1_2.xpi + + + + addon6@tests.mozilla.org + Addon Test 6 + + + 1.0 + 1.0 + + + XPCShell + 1.0 + 1.0 + xpcshell@tests.mozilla.org + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate.rdf new file mode 100644 index 000000000..d1dc992d5 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate.rdf @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + 2 + + + + 2 + + + + 2 + + + + 2 + + + + 2 + + + + 2 + + + + 4 + + + + 4 + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate4.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate4.rdf new file mode 100644 index 000000000..a3bf4f8ae --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_migrate4.rdf @@ -0,0 +1,46 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 0 + 2 + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 0 + 2 + http://localhost:%PORT%/addons/test_migrate4_6.xpi + http://example.com/updateInfo.xhtml + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_no_update.json b/toolkit/mozapps/webextensions/test/xpcshell/data/test_no_update.json new file mode 100644 index 000000000..2773c7f98 --- /dev/null +++ b/toolkit/mozapps/webextensions/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/webextensions/test/xpcshell/data/test_overrideblocklist/ancient.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/ancient.xml new file mode 100644 index 000000000..699257f87 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/ancient.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/new.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/new.xml new file mode 100644 index 000000000..8cbfb5d6a --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/new.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/old.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/old.xml new file mode 100644 index 000000000..75bd6e934 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_overrideblocklist/old.xml @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtp.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtp.xml new file mode 100644 index 000000000..d3564aebd --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtp.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml new file mode 100644 index 000000000..7cd8496b3 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_pluginBlocklistCtpUndo.xml @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_proxy/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/test_proxy/bootstrap.js new file mode 100644 index 000000000..1666f2972 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_proxy/bootstrap.js @@ -0,0 +1 @@ +Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_softblocked1.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_softblocked1.xml new file mode 100644 index 000000000..a1d18470c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_softblocked1.xml @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_sourceURI.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_sourceURI.xml new file mode 100644 index 000000000..949288e3f --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_sourceURI.xml @@ -0,0 +1,18 @@ + + + + + Test + Extension + addon@tests.mozilla.org + 1 + + + xpcshell@tests.mozilla.org + 1 + 1 + + + http://www.example.com/testaddon.xpi + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_temporary/bootstrap.js b/toolkit/mozapps/webextensions/test/xpcshell/data/test_temporary/bootstrap.js new file mode 100644 index 000000000..1666f2972 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_temporary/bootstrap.js @@ -0,0 +1 @@ +Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.json b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.json new file mode 100644 index 000000000..027a9b233 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.json @@ -0,0 +1,215 @@ +{ + "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://localhost:%PORT%/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://localhost:%PORT%/addons/test_update8.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "advisory_max_version": "1" + } + } + } + ] + }, + + "addon9@tests.mozilla.org": { + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:%PORT%/addons/test_update9_2.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "advisory_max_version": "1" + } + } + }, + { + "_comment_": "Incompatible when strict compatibility is enabled", + "version": "3.0", + "update_link": "http://localhost:%PORT%/addons/test_update9_3.xpi", + "applications": { + "gecko": { + "strict_min_version": "0.9", + "advisory_max_version": "0.9" + } + } + }, + { + "_comment_": "Incompatible due to compatibility override", + "version": "4.0", + "update_link": "http://localhost:%PORT%/addons/test_update9_4.xpi", + "applications": { + "gecko": { + "strict_min_version": "0.9", + "advisory_max_version": "0.9" + } + } + }, + { + "_comment_": "Addon for future version of app", + "version": "4.0", + "update_link": "http://localhost:%PORT%/addons/test_update9_5.xpi", + "applications": { + "gecko": { + "strict_min_version": "5", + "advisory_max_version": "6" + } + } + } + ] + }, + + "addon10@tests.mozilla.org": { + "updates": [ + { + "version": "1.0", + "update_link": "http://localhost:%PORT%/addons/test_update10.xpi", + "applications": { + "gecko": { + "strict_min_version": "0.1", + "advisory_max_version": "0.4" + } + } + } + ] + }, + + "addon11@tests.mozilla.org": { + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:%PORT%/addons/test_update11.xpi", + "applications": { + "gecko": { + "strict_min_version": "0.1", + "strict_max_version": "0.2" + } + } + } + ] + }, + + "addon12@tests.mozilla.org": { + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:%PORT%/addons/test_update12.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "advisory_max_version": "1" + } + } + } + ] + } + } +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.rdf new file mode 100644 index 000000000..4d4640f60 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.rdf @@ -0,0 +1,270 @@ + + + + + + + +
  • + + 1.0 + + + + xpcshell@tests.mozilla.org + 1 + 1 + + + + + + + xpcshell@tests.mozilla.org + 2 + 2 + + + +
  • + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_update.xpi + http://example.com/updateInfo.xhtml + + + +
  • +
    +
    +
    + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0 + 1 + + + +
  • +
    +
    +
    + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 3 + 3 + + + +
  • +
    +
    +
    + + + + +
  • + + 5.0 + + + xpcshell@tests.mozilla.org + 0 + 0 + + + +
  • +
    +
    +
    + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0 + 1 + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_update8.xpi + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_update9_2.xpi + + + +
  • + +
  • + + 3.0 + + + xpcshell@tests.mozilla.org + 0.9 + 0.9 + http://localhost:%PORT%/addons/test_update9_3.xpi + + + +
  • + +
  • + + 4.0 + + + xpcshell@tests.mozilla.org + 0.9 + 0.9 + http://localhost:%PORT%/addons/test_update9_4.xpi + + + +
  • + +
  • + + 5.0 + + + xpcshell@tests.mozilla.org + 5 + 6 + http://localhost:%PORT%/addons/test_update9_5.xpi + + + +
  • +
    +
    +
    + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0.1 + 0.4 + http://localhost:%PORT%/addons/test_update10.xpi + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 0.1 + 0.2 + true + http://localhost:%PORT%/addons/test_update11.xpi + + + +
  • +
    +
    +
    + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:%PORT%/addons/test_update12.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.xml b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.xml new file mode 100644 index 000000000..62928815b --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update.xml @@ -0,0 +1,26 @@ + + + + Test Addon 9 + Extension + addon9@tests.mozilla.org + + + addon9@tests.mozilla.org + Test Addon 9 + + + 4 + 4 + + + XPCShell + 1 + 1 + xpcshell@tests.mozilla.org + + + + + + diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_update_multi.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update_multi.rdf new file mode 100644 index 000000000..f28a3f26d --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_update_multi.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/addons/test_update_multi2.xpi + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.json b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.json new file mode 100644 index 000000000..811e50158 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.json @@ -0,0 +1,327 @@ +{ + "addons": { + "updatecheck1@tests.mozilla.org": { + "updates": [ + { + "version": "1.0", + "update_link": "https://localhost:4444/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://localhost:4444/addons/test2.xpi", + "applications": { + "gecko": { + "strict_min_version": "2", + "strict_max_version": "2" + } + } + }, + { + "version": "3.0", + "update_link": "https://localhost:4444/addons/test3.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "strict_max_version": "1" + } + } + }, + { + "version": "2.0", + "update_link": "https://localhost:4444/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://localhost:4444/addons/test4.xpi", + "applications": { + "gecko": { + "strict_min_version": "2", + "strict_max_version": "2" + } + } + } + ] + }, + + "test_bug378216_5@tests.mozilla.org": { + "_comment_": "An update which expects a signature. It will fail since signatures are ", + "_comment_": "supported in this format.", + "_comment_": "The updateLink will also be ignored since it is not secure and there ", + "_comment_": "is no updateHash.", + + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:4444/broken.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "strict_max_version": "1" + } + } + } + ] + }, + + "test_bug378216_5@tests.mozilla.org": { + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:4444/broken.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "strict_max_version": "1" + } + } + } + ] + }, + + "test_bug378216_7@tests.mozilla.org": { + "_comment_": "An update which expects a signature. It will fail since signatures are ", + "_comment_": "supported in this format.", + "_comment_": "The updateLink will also be ignored since it is not secure ", + "_comment_": "and there is no updateHash.", + + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:4444/broken.xpi", + "applications": { + "gecko": { + "strict_min_version": "1", + "strict_max_version": "2" + } + } + } + ] + }, + + "test_bug378216_8@tests.mozilla.org": { + "_comment_": "The updateLink will be ignored since it is not secure and ", + "_comment_": "there is no updateHash.", + + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:4444/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://localhost:4444/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://localhost:4444/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://localhost:4444/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 ", + "_comment_": "verifying it is not strong enough.", + + "updates": [ + { + "version": "2.0", + "update_link": "http://localhost:4444/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 ", + "_comment_": "a secure URL.", + + "updates": [ + { + "version": "2.0", + "update_link": "https://localhost:4444/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://localhost:4444/addons/test1.xpi", + "applications": { + "gecko": { + "strict_min_version": "0.1", + "advisory_max_version": "0.2" + } + } + }, + { + "version": "2.0", + "update_link": "https://localhost:4444/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://localhost:4444/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://localhost:4444/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://localhost:4444/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://localhost:4444/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://localhost:4444/addons/test1.xpi", + "_comment_": "strictCompatibility: true", + "applications": { + "gecko": { + "strict_min_version": "0.1", + "strict_max_version": "0.2" + } + } + } + ] + } + } +} diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.rdf new file mode 100644 index 000000000..c5d97ada0 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecheck.rdf @@ -0,0 +1,419 @@ + + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + https://localhost:4444/addons/test1.xpi + + + +
  • + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 2 + 2 + https://localhost:4444/addons/test2.xpi + + + +
  • +
  • + + 3.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + https://localhost:4444/addons/test3.xpi + + + +
  • +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + https://localhost:4444/addons/test2.xpi + + + +
  • + +
  • + + 4.0 + + + xpcshell@tests.mozilla.org + 2 + 2 + https://localhost:4444/addons/test4.xpi + + + +
  • +
    +
    +
    + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/broken.xpi + + + + + + + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + http://localhost:4444/broken.xpi + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBAMO1O2gwSCCth1GwYMgscfaNakpN40PJfOWt + ub2HVdg8+OXMciF8d/9eVWm8eH/IxuxyZlmRZTs3O5tv9eWAY5uBCtqDf1WgTsGk + jrgZow1fITkZI7w0//C8eKdMLAtGueGfNs2IlTd5P/0KH/hf1rPc1wUqEqKCd4+L + BcVq13ad + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/broken.xpi + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBAMH/33P/bn148mVkAB8i5X8c4LhY52E+MPUT + yKHGpowZnRLgL2O0dfpm+rljOBfKi51322PFrsc6VIFml6x4Lrb5foxSyB0Vs9pb + SEDFWUKquOQvceQ9iEx5Pe0VzrmUZgcQxd8ksSunWL4wJaBZ/evE5amFC6sw3pv/ + fjt8p3GN + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/broken.xpi + sha1:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6 + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBAJ5Dv3Zd7/j5dLchCw9iO/cxPq8oOhOYD2M+ + jUKvmHCyTBRIEaJrE4N7yVbRYk++ERIfyVepLivsVi4pBmF7JTdw0NaKUA0LiOoT + mRL8I7s5NPjCiiNcdqbncWyiZwIj1w1nkbWGTlH/gEjRW/LbvT4JAuec8yNFDa4S + X8mOMf7k + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + https://localhost:4444/broken.xpi + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBAGvf7XqqoTl5WofrNq55E7W+UttOEDXLB3Oi + XDiXe0i6njlozilseaUo1hgfQhhzN9gkyetP5tGBVcLRrVyliKpJmD6ABCVGW1lS + qS+SEw7gDHyHkvwKMyWKedpRGChqLYnnf+Y+CX3MWLZLkwPXMKdTYgN3Rx0lEnJk + 37LSEMKE + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + https://localhost:4444/broken.xpi + sha1:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6 + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBACMX/KReOGSJ8CMGRroH1v3Gjv/Qs/pqH+Ow + o+hCKWLUKx7hpJgVJkXXdAHW0U88NXlp1S2H0WqA7I/CdmNXJSPzzV/J4z1dZgXh + JbW6mqNb0pj6nIe7g8OLzSxDgBmO4DUP5DAmnmqciJLWQzN7OdbcwrWz6xPN5kZF + A90eF5zy + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/broken.xpi + md2:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6 + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBAJRfcFvHIWxVyycCw8IjNmEhabc2uqA1zQwp + 5oKh3Y23hwIsQ6xy68Wtjte1NEYFRt5fWkbMXj9YQj6LpVbzBKiGATcrq6MycZKK + o5N22cWbrKKRweJezTyN4eLfQg21pG7r8mdfS0bIA28ZVFtQOmORejoUesEouCGy + eKYk9nS2 + + + + + + + + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + https://localhost:4444/broken.xpi + md2:78fc1d2887eda35b4ad2e3a0b60120ca271ce6e6 + + + + + + + MIGTMA0GCSqGSIb3DQEBBQUAA4GBALQKwzLFr/VOw3gJvv/LCh3/PWDd9FqmFnX+ + hJjBmCaUDtG7CXn1i0h8ed8IeRHpLLT7FCzVwU3bH9BUjdm8wc3ObtlNbd8go01a + CoXz50r3rYPcYz4WS+7/+lvrUqsuWd9Wj+q0NeCPiNaaro6/AolE2Qf5JFRL3lxY + lsKWAnVO + + + + + + + Foo + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0.1 + 0.2 + https://localhost:4444/addons/test1.xpi + + + +
  • +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 0.5 + 0.6 + https://localhost:4444/addons/test2.xpi + + + +
  • + +
  • + + 3.0 + + + xpcshell@tests.mozilla.org + 2 + 3 + https://localhost:4444/addons/test3.xpi + + + +
  • +
    +
    +
    + + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0.1 + 0.2 + https://localhost:4444/addons/test1.xpi + + + +
  • + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 0.5 + 0.6 + https://localhost:4444/addons/test2.xpi + + + +
  • + +
  • + + 3.0 + + + xpcshell@tests.mozilla.org + 2 + 3 + https://localhost:4444/addons/test3.xpi + + + +
  • +
    +
    +
    + + + + + +
  • + + 1.0 + + + xpcshell@tests.mozilla.org + 0.1 + 0.2 + true + https://localhost:4444/addons/test1.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_ignore.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_ignore.rdf new file mode 100644 index 000000000..ec6e88ec4 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_ignore.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + https://localhost:%PORT%/addons/test1.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_normal.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_normal.rdf new file mode 100644 index 000000000..2ef88860e --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_normal.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + https://localhost:%PORT%/addons/test1.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_strict.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_strict.rdf new file mode 100644 index 000000000..2f72c181d --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updatecompatmode_strict.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 2 + https://localhost:%PORT%/addons/test1.xpi + + + +
  • +
    +
    +
    +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/test_updateid.rdf b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updateid.rdf new file mode 100644 index 000000000..c13928520 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/test_updateid.rdf @@ -0,0 +1,26 @@ + + + + + + + +
  • + + 2.0 + + + xpcshell@tests.mozilla.org + 1 + 1 + http://localhost:4444/addons/test_updateid2.xpi + + + +
  • +
    +
    +
    + +
    diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/unsigned.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/unsigned.xpi new file mode 100644 index 000000000..51b00475a Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/unsigned.xpi differ diff --git a/toolkit/mozapps/webextensions/test/xpcshell/data/webext-implicit-id.xpi b/toolkit/mozapps/webextensions/test/xpcshell/data/webext-implicit-id.xpi new file mode 100644 index 000000000..6b4abaa69 Binary files /dev/null and b/toolkit/mozapps/webextensions/test/xpcshell/data/webext-implicit-id.xpi differ -- cgit v1.2.3