diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-10 02:49:12 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-10 02:49:12 -0500 |
commit | 4fb11cd5966461bccc3ed1599b808237be6b0de9 (patch) | |
tree | d7f0ccd49cebb3544d52635ff1bd6ed4d763823f /toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks | |
parent | f164d9124708b50789dbb6959e1de96cc5697c48 (diff) | |
download | UXP-4fb11cd5966461bccc3ed1599b808237be6b0de9.tar UXP-4fb11cd5966461bccc3ed1599b808237be6b0de9.tar.gz UXP-4fb11cd5966461bccc3ed1599b808237be6b0de9.tar.lz UXP-4fb11cd5966461bccc3ed1599b808237be6b0de9.tar.xz UXP-4fb11cd5966461bccc3ed1599b808237be6b0de9.zip |
Move WebExtensions enabled Add-ons Manager
Diffstat (limited to 'toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks')
30 files changed, 156 insertions, 0 deletions
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 @@ +<?xml version="1.0"?> + +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + + <Description about="urn:mozilla:install-manifest"> + <em:id>test@tests.mozilla.org</em:id> + <em:version>1.0</em:version> + <em:bootstrap>true</em:bootstrap> + + <!-- Front End MetaData --> + <em:name>Test Add-on</em:name> + <em:updateURL>http://localhost:4444/update.rdf</em:updateURL> + + <em:targetApplication> + <Description> + <em:id>xpcshell@tests.mozilla.org</em:id> + <em:minVersion>2</em:minVersion> + <em:maxVersion>5</em:maxVersion> + </Description> + </em:targetApplication> + + </Description> +</RDF> 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 @@ +<?xml version="1.0"?> + +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + + <Description about="urn:mozilla:install-manifest"> + <em:id>test@tests.mozilla.org</em:id> + <em:version>2.0</em:version> + <em:bootstrap>true</em:bootstrap> + + <!-- Front End MetaData --> + <em:name>Test Add-on</em:name> + <em:updateURL>http://localhost:4444/update.rdf</em:updateURL> + + <em:targetApplication> + <Description> + <em:id>xpcshell@tests.mozilla.org</em:id> + <em:minVersion>4</em:minVersion> + <em:maxVersion>6</em:maxVersion> + </Description> + </em:targetApplication> + + </Description> +</RDF> 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 Binary files differnew file mode 100644 index 000000000..9d6f0c708 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_badid.xpi 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 Binary files differnew file mode 100644 index 000000000..4496a90cf --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_broken.xpi 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 Binary files differnew file mode 100644 index 000000000..e61e3c721 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/hotfix_good.xpi 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 Binary files differnew file mode 100644 index 000000000..1682a7506 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_hash.xpi 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 Binary files differnew file mode 100644 index 000000000..cd67e25fc --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_63_plain.xpi 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 Binary files differnew file mode 100644 index 000000000..e4040a274 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_hash.xpi 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 Binary files differnew file mode 100644 index 000000000..ca453b9d5 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_64_plain.xpi 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 Binary files differnew file mode 100644 index 000000000..69579d2dc --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/long_65_hash.xpi 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 Binary files differnew file mode 100644 index 000000000..6e23eb214 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_badid.xpi 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 Binary files differnew file mode 100644 index 000000000..0ba0f30d1 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_broken.xpi 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 Binary files differnew file mode 100644 index 000000000..33101f63c --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_signed.xpi 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 Binary files differnew file mode 100644 index 000000000..3146870d8 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/multi_unsigned.xpi 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 @@ +<?xml version="1.0"?> + +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + + <Description about="urn:mozilla:install-manifest"> + <em:id>test@tests.mozilla.org</em:id> + <em:version>1.0</em:version> + + <!-- Front End MetaData --> + <em:name>Test Add-on</em:name> + <em:updateURL>http://localhost:4444/update.rdf</em:updateURL> + + <em:targetApplication> + <Description> + <em:id>xpcshell@tests.mozilla.org</em:id> + <em:minVersion>2</em:minVersion> + <em:maxVersion>5</em:maxVersion> + </Description> + </em:targetApplication> + + </Description> +</RDF> 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 @@ +<?xml version="1.0"?> + +<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:em="http://www.mozilla.org/2004/em-rdf#"> + + <Description about="urn:mozilla:install-manifest"> + <em:id>test@tests.mozilla.org</em:id> + <em:version>2.0</em:version> + + <!-- Front End MetaData --> + <em:name>Test Add-on</em:name> + <em:updateURL>http://localhost:4444/update.rdf</em:updateURL> + + <em:targetApplication> + <Description> + <em:id>xpcshell@tests.mozilla.org</em:id> + <em:minVersion>4</em:minVersion> + <em:maxVersion>6</em:maxVersion> + </Description> + </em:targetApplication> + + </Description> +</RDF> 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 Binary files differnew file mode 100644 index 000000000..ec38fcc65 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/preliminary_bootstrap_2.xpi 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 Binary files differnew file mode 100644 index 000000000..fc2842399 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_1.xpi 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 Binary files differnew file mode 100644 index 000000000..327c8a187 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_2.xpi 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 Binary files differnew file mode 100644 index 000000000..efad21d1b --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_bootstrap_badid_2.xpi 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 Binary files differnew file mode 100644 index 000000000..d6ddbcec3 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_2.xpi 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 Binary files differnew file mode 100644 index 000000000..5898d83e4 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/signed_nonbootstrap_badid_2.xpi 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 Binary files differnew file mode 100644 index 000000000..9d50f0825 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_bootstrap_2.xpi 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 Binary files differnew file mode 100644 index 000000000..6ba1efd72 --- /dev/null +++ b/toolkit/mozapps/webextensions/test/xpcshell/data/signing_checks/unsigned_nonbootstrap_2.xpi |