diff options
Diffstat (limited to 'toolkit/mozapps/extensions/test/addons')
44 files changed, 202 insertions, 414 deletions
diff --git a/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js b/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js index a5d5beb34..f8a62bcaa 100644 --- a/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js +++ b/toolkit/mozapps/extensions/test/addons/bootstrap_globals/bootstrap.js @@ -1,13 +1,13 @@ Components.utils.import("resource://gre/modules/Services.jsm"); -var seenGlobals = new Set(); -var scope = this; +let seenGlobals = new Set(); +let scope = this; function checkGlobal(name, type) { if (scope[name] && typeof(scope[name]) == type) seenGlobals.add(name); } -var wrapped = {}; +let wrapped = {}; Services.obs.notifyObservers({ wrappedJSObject: wrapped }, "bootstrap-request-globals", null); for (let [name, type] of wrapped.expectedGlobals) { checkGlobal(name, type); diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/bootstrap.js index 1666f2972..eba6762c8 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/bootstrap.js +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/bootstrap.js @@ -1 +1,32 @@ -Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); +Components.utils.import("resource://gre/modules/Services.jsm"); + +// Test steps chain from pref observers on *_reason, +// so always set that last +function install(data, reason) { + Components.utils.import(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.installed_version", VERSION); + Services.prefs.setIntPref("bootstraptest.install_oldversion", data.oldVersion); + Components.utils.unload(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Components.utils.reportError("bootstrap startup"); + Components.utils.import(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.active_version", VERSION); + Services.prefs.setIntPref("bootstraptest.startup_oldversion", data.oldVersion); + Components.utils.unload(data.resourceURI.spec + "version.jsm"); + 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/extensions/test/addons/test_bootstrap1_2/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/bootstrap.js index 1666f2972..8839bfb7d 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/bootstrap.js +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_2/bootstrap.js @@ -1 +1,31 @@ -Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); +Components.utils.import("resource://gre/modules/Services.jsm"); + +// Test steps chain from pref observers on *_reason, +// so always set that last +function install(data, reason) { + Components.utils.import(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.installed_version", VERSION); + Services.prefs.setIntPref("bootstraptest.install_oldversion", data.oldVersion); + Components.utils.unload(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Components.utils.import(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.active_version", VERSION); + Services.prefs.setIntPref("bootstraptest.startup_oldversion", data.oldVersion); + Components.utils.unload(data.resourceURI.spec + "version.jsm"); + 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/extensions/test/addons/test_bootstrap1_3/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/bootstrap.js index 1666f2972..8839bfb7d 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/bootstrap.js +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap1_3/bootstrap.js @@ -1 +1,31 @@ -Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); +Components.utils.import("resource://gre/modules/Services.jsm"); + +// Test steps chain from pref observers on *_reason, +// so always set that last +function install(data, reason) { + Components.utils.import(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.installed_version", VERSION); + Services.prefs.setIntPref("bootstraptest.install_oldversion", data.oldVersion); + Components.utils.unload(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Components.utils.import(data.resourceURI.spec + "version.jsm"); + Services.prefs.setIntPref("bootstraptest.active_version", VERSION); + Services.prefs.setIntPref("bootstraptest.startup_oldversion", data.oldVersion); + Components.utils.unload(data.resourceURI.spec + "version.jsm"); + 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/extensions/test/addons/test_bootstrap2_1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_bootstrap2_1/bootstrap.js index 1666f2972..476edfeee 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap2_1/bootstrap.js +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap2_1/bootstrap.js @@ -1 +1,17 @@ -Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); +Components.utils.import("resource://gre/modules/Services.jsm"); + +function install(data, reason) { + Services.prefs.setIntPref("bootstraptest2.installed_version", 1); +} + +function startup(data, reason) { + Services.prefs.setIntPref("bootstraptest2.active_version", 1); +} + +function shutdown(data, reason) { + Services.prefs.setIntPref("bootstraptest2.active_version", 0); +} + +function uninstall(data, reason) { + Services.prefs.setIntPref("bootstraptest2.installed_version", 0); +} diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js index 0e45caec4..498b76526 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/bootstrap.js @@ -1,5 +1,5 @@ -Components.utils.import("resource://gre/modules/Services.jsm"); - -const install = function() { - Services.obs.notifyObservers(null, "addon-install", ""); -} +Components.utils.import("resource://gre/modules/Services.jsm");
+
+const install = function() {
+ Services.obs.notifyObservers(null, "addon-install", "");
+}
\ No newline at end of file diff --git a/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf index 898282991..af3a749ce 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf +++ b/toolkit/mozapps/extensions/test/addons/test_bootstrap_const/install.rdf @@ -1,24 +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>bootstrap@tests.mozilla.org</em:id> - <em:version>1.0</em:version> - <em:bootstrap>true</em:bootstrap> - - <!-- Front End MetaData --> - <em:name>Test Bootstrap</em:name> - <em:description>Test Description</em:description> - - <em:targetApplication> - <Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> - </Description> - </em:targetApplication> - - </Description> -</RDF> +<?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>bootstrap@tests.mozilla.org</em:id>
+ <em:version>1.0</em:version>
+ <em:bootstrap>true</em:bootstrap>
+
+ <!-- Front End MetaData -->
+ <em:name>Test Bootstrap</em:name>
+ <em:description>Test Description</em:description>
+
+ <em:targetApplication>
+ <Description>
+ <em:id>xpcshell@tests.mozilla.org</em:id>
+ <em:minVersion>1</em:minVersion>
+ <em:maxVersion>1</em:maxVersion>
+ </Description>
+ </em:targetApplication>
+
+ </Description>
+</RDF>
\ No newline at end of file diff --git a/toolkit/mozapps/extensions/test/addons/test_bug675371/test.js b/toolkit/mozapps/extensions/test/addons/test_bug675371/test.js index b942a8064..ae74c174d 100644 --- a/toolkit/mozapps/extensions/test/addons/test_bug675371/test.js +++ b/toolkit/mozapps/extensions/test/addons/test_bug675371/test.js @@ -1 +1 @@ -var active = true; +active = true; diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_v2/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_v2/bootstrap.js deleted file mode 100644 index c5a80c7b9..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_v2/bootstrap.js +++ /dev/null @@ -1,10 +0,0 @@ -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"; - -function install(data, reason) {} - -function startup(data, reason) {} - -function shutdown(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_v2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_v2/install.rdf deleted file mode 100644 index 3ebbe16b0..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_v2/install.rdf +++ /dev/null @@ -1,27 +0,0 @@ -<?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_delay_update_complete@tests.mozilla.org</em:id> - <em:version>2.0</em:version> - <em:bootstrap>true</em:bootstrap> - - <!-- Front End MetaData --> - <em:name>Test Delay Update Complete</em:name> - <em:description>Test Description</em:description> - - <em:iconURL>chrome://foo/skin/icon.png</em:iconURL> - <em:aboutURL>chrome://foo/content/about.xul</em:aboutURL> - <em:optionsURL>chrome://foo/content/options.xul</em:optionsURL> - - <em:targetApplication> - <Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> - </Description> - </em:targetApplication> - - </Description> diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_webextension_v2/manifest.json b/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_webextension_v2/manifest.json deleted file mode 100644 index 1a98f4660..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_complete_webextension_v2/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "manifest_version": 2, - "name": "Delay Upgrade", - "version": "2.0", - "applications": { - "gecko": { - "id": "test_delay_update_complete_webext@tests.mozilla.org" - } - } -} diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_v2/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_v2/bootstrap.js deleted file mode 100644 index dea028488..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_v2/bootstrap.js +++ /dev/null @@ -1,10 +0,0 @@ -Components.utils.import("resource://gre/modules/Services.jsm"); -Components.utils.import("resource://gre/modules/AddonManager.jsm"); - -const ADDON_ID = "test_delay_update_defer@tests.mozilla.org"; - -function install(data, reason) {} - -function startup(data, reason) {} - -function shutdown(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_webextension_v2/manifest.json b/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_webextension_v2/manifest.json deleted file mode 100644 index 9561979dc..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_webextension_v2/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "manifest_version": 2, - "name": "Delay Upgrade", - "version": "2.0", - "applications": { - "gecko": { - "id": "test_delay_update_defer_webext@tests.mozilla.org" - } - } -} diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_v2/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_v2/bootstrap.js deleted file mode 100644 index fb8fc9540..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_v2/bootstrap.js +++ /dev/null @@ -1,8 +0,0 @@ -Components.utils.import("resource://gre/modules/Services.jsm"); -Components.utils.import("resource://gre/modules/AddonManager.jsm"); - -function install(data, reason) {} - -function startup(data, reason) {} - -function shutdown(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_v2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_v2/install.rdf deleted file mode 100644 index aec4b202e..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_v2/install.rdf +++ /dev/null @@ -1,28 +0,0 @@ -<?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_delay_update_ignore@tests.mozilla.org</em:id> - <em:version>2.0</em:version> - <em:bootstrap>true</em:bootstrap> - - <!-- Front End MetaData --> - <em:name>Test Delay Update Ignore</em:name> - <em:description>Test Description</em:description> - - <em:iconURL>chrome://foo/skin/icon.png</em:iconURL> - <em:aboutURL>chrome://foo/content/about.xul</em:aboutURL> - <em:optionsURL>chrome://foo/content/options.xul</em:optionsURL> - <em:updateURL>http://localhost:4444/data/test_delay_updates_ignore.rdf</em:updateURL> - - <em:targetApplication> - <Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> - </Description> - </em:targetApplication> - - </Description> diff --git a/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_webextension_v2/manifest.json b/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_webextension_v2/manifest.json deleted file mode 100644 index d9200ec11..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_ignore_webextension_v2/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "manifest_version": 2, - "name": "Delay Upgrade", - "version": "2.0", - "applications": { - "gecko": { - "id": "test_delay_update_ignore_webext@tests.mozilla.org" - } - } -} diff --git a/toolkit/mozapps/extensions/test/addons/test_dictionary/chrome.manifest b/toolkit/mozapps/extensions/test/addons/test_dictionary/chrome.manifest deleted file mode 100644 index c945c928c..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_dictionary/chrome.manifest +++ /dev/null @@ -1 +0,0 @@ -content dict ./ diff --git a/toolkit/mozapps/extensions/test/addons/test_experiment1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_experiment1/bootstrap.js deleted file mode 100644 index 1666f2972..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_experiment1/bootstrap.js +++ /dev/null @@ -1 +0,0 @@ -Components.utils.import("resource://xpcshell-data/BootstrapMonitor.jsm").monitor(this); diff --git a/toolkit/mozapps/extensions/test/addons/test_install7/addon1.xpi b/toolkit/mozapps/extensions/test/addons/test_install7/addon1.xpi deleted file mode 100644 index 9c283d1d4..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_install7/addon1.xpi +++ /dev/null @@ -1 +0,0 @@ -This isn't a valid zip file.
\ No newline at end of file diff --git a/toolkit/mozapps/extensions/test/addons/test_install7/addon2.xpi b/toolkit/mozapps/extensions/test/addons/test_install7/addon2.xpi deleted file mode 100644 index 9c283d1d4..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_install7/addon2.xpi +++ /dev/null @@ -1 +0,0 @@ -This isn't a valid zip file.
\ No newline at end of file diff --git a/toolkit/mozapps/extensions/test/addons/test_install7/install.rdf b/toolkit/mozapps/extensions/test/addons/test_install7/install.rdf deleted file mode 100644 index 5e99ae29a..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_install7/install.rdf +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0"?> - -<!-- A multi-package XPI --> -<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:type>32</em:type> - </Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/test_install8/install.rdf b/toolkit/mozapps/extensions/test/addons/test_install8/install.rdf deleted file mode 100644 index 5e99ae29a..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_install8/install.rdf +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0"?> - -<!-- A multi-package XPI --> -<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:type>32</em:type> - </Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/test_symbol/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_symbol/bootstrap.js deleted file mode 100644 index 4eb8b4875..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_symbol/bootstrap.js +++ /dev/null @@ -1,62 +0,0 @@ -Components.utils.import("resource://gre/modules/Services.jsm"); -Components.utils.import("resource://gre/modules/AddonManager.jsm"); - -const PASS_PREF = "symboltest.instanceid.pass"; -const FAIL_BOGUS_PREF = "symboltest.instanceid.fail_bogus"; -const FAIL_ID_PREF = "symboltest.instanceid.fail_bogus"; -const ADDON_ID = "test_symbol@tests.mozilla.org"; - -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(PASS_PREF, false); - Services.prefs.setBoolPref(FAIL_BOGUS_PREF, false); - Services.prefs.setBoolPref(FAIL_ID_PREF, false); - - // test with the correct symbol - if (data.hasOwnProperty("instanceID") && data.instanceID) { - AddonManager.getAddonByInstanceID(data.instanceID) - .then(addon => { - if (addon.id == ADDON_ID) { - Services.prefs.setBoolPref(PASS_PREF, true); - } - }).catch(err => { - throw Error("no addon found for symbol"); - }); - - } - - // test with a totally bogus symbol - AddonManager.getAddonByInstanceID(Symbol("bad symbol")) - .then(addon => { - // there is no symbol by this name, so null should be returned - if (addon == null) { - Services.prefs.setBoolPref(FAIL_BOGUS_PREF, true); - } else { - throw Error("bad symbol should not match:", addon); - } - }).catch(err => { - throw Error("promise should not have rejected: " + err); - }); - - // try to make a matching symbol - this should fail because it's not a - // reference to the same symbol stored inside the addons manager. - AddonManager.getAddonByInstanceID(Symbol(ADDON_ID)) - .then(addon => { - // there is no symbol by this name, so null should be returned - if (addon == null) { - Services.prefs.setBoolPref(FAIL_ID_PREF, true); - } else { - throw Error("bad symbol should not match:", addon); - } - }).catch(err => { - throw Error("promise should not have rejected: " + err); - }); - -} - -function shutdown(data, reason) {} - -function uninstall(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js deleted file mode 100644 index 24c778c09..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_update_multi1/bootstrap.js +++ /dev/null @@ -1,5 +0,0 @@ - -function install(data, reason) {} -function startup(data, reason) {} -function shutdown(data, reason) {} -function uninstall(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf deleted file mode 100644 index 9f955562c..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_update_multi1/install.rdf +++ /dev/null @@ -1,16 +0,0 @@ -<?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>updatemulti@tests.mozilla.org</em:id> - <em:version>1.0</em:version> - <em:updateURL>http://localhost:4444/data/test_update_multi.rdf</em:updateURL> - <em:bootstrap>true</em:bootstrap> - <em:name>Test Addon 1</em:name> -<em:targetApplication><Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> -</Description></em:targetApplication> -</Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi2/addon.xpi b/toolkit/mozapps/extensions/test/addons/test_update_multi2/addon.xpi Binary files differdeleted file mode 100644 index febff06fa..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_update_multi2/addon.xpi +++ /dev/null diff --git a/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf deleted file mode 100644 index 44bdb05ba..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_update_multi2/install.rdf +++ /dev/null @@ -1,9 +0,0 @@ -<?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>updatemulti@tests.mozilla.org</em:id> - <em:type>32</em:type> - <em:version>2.0</em:version> -</Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid1/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid1/bootstrap.js deleted file mode 100644 index 24c778c09..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_updateid1/bootstrap.js +++ /dev/null @@ -1,5 +0,0 @@ - -function install(data, reason) {} -function startup(data, reason) {} -function shutdown(data, reason) {} -function uninstall(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid1/install.rdf deleted file mode 100644 index 803b64e5f..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_updateid1/install.rdf +++ /dev/null @@ -1,16 +0,0 @@ -<?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>addon1@tests.mozilla.org</em:id> - <em:version>1.0</em:version> - <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL> - <em:bootstrap>true</em:bootstrap> - <em:name>Test Addon 1</em:name> -<em:targetApplication><Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> -</Description></em:targetApplication> -</Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid2/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid2/bootstrap.js deleted file mode 100644 index 24c778c09..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_updateid2/bootstrap.js +++ /dev/null @@ -1,5 +0,0 @@ - -function install(data, reason) {} -function startup(data, reason) {} -function shutdown(data, reason) {} -function uninstall(data, reason) {} diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid2/install.rdf deleted file mode 100644 index 041af57f0..000000000 --- a/toolkit/mozapps/extensions/test/addons/test_updateid2/install.rdf +++ /dev/null @@ -1,16 +0,0 @@ -<?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>addon1.changed@tests.mozilla.org</em:id> - <em:version>2.0</em:version> - <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL> - <em:bootstrap>true</em:bootstrap> - <em:name>Test Addon 1</em:name> -<em:targetApplication><Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> -</Description></em:targetApplication> -</Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/test_hotfix_2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid2_2/install.rdf index fd843dbe9..5982b9868 100644 --- a/toolkit/mozapps/extensions/test/addons/test_hotfix_2/install.rdf +++ b/toolkit/mozapps/extensions/test/addons/test_updateid2_2/install.rdf @@ -4,11 +4,12 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> - <em:id>hotfix@tests.mozilla.org</em:id> + <em:id>addon2@tests.mozilla.org</em:id> <em:version>2.0</em:version> + <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL> <!-- Front End MetaData --> - <em:name>Test 1</em:name> + <em:name>Test 2</em:name> <em:description>Test Description</em:description> <em:targetApplication> diff --git a/toolkit/mozapps/extensions/test/addons/test_hotfix_1/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid2_5/install.rdf index 7fcc1a09e..e923a5289 100644 --- a/toolkit/mozapps/extensions/test/addons/test_hotfix_1/install.rdf +++ b/toolkit/mozapps/extensions/test/addons/test_updateid2_5/install.rdf @@ -4,11 +4,12 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> - <em:id>hotfix@tests.mozilla.org</em:id> - <em:version>1.0</em:version> + <em:id>addon2@tests.mozilla.org</em:id> + <em:version>5.0</em:version> + <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL> <!-- Front End MetaData --> - <em:name>Test 1</em:name> + <em:name>Test 2</em:name> <em:description>Test Description</em:description> <em:targetApplication> diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid3_3/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid3_3/bootstrap.js new file mode 100644 index 000000000..c28d75925 --- /dev/null +++ b/toolkit/mozapps/extensions/test/addons/test_updateid3_3/bootstrap.js @@ -0,0 +1,21 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +function install(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", 3); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", 3); + 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/extensions/test/addons/test_symbol/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid3_3/install.rdf index adccda552..ffed064cf 100644 --- a/toolkit/mozapps/extensions/test/addons/test_symbol/install.rdf +++ b/toolkit/mozapps/extensions/test/addons/test_updateid3_3/install.rdf @@ -4,18 +4,15 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> - <em:id>test_symbol@tests.mozilla.org</em:id> - <em:version>1.0</em:version> + <em:id>addon3@tests.mozilla.org</em:id> + <em:version>3.0</em:version> + <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL> <em:bootstrap>true</em:bootstrap> <!-- Front End MetaData --> - <em:name>Test Symbol</em:name> + <em:name>Test 3</em:name> <em:description>Test Description</em:description> - <em:iconURL>chrome://foo/skin/icon.png</em:iconURL> - <em:aboutURL>chrome://foo/content/about.xul</em:aboutURL> - <em:optionsURL>chrome://foo/content/options.xul</em:optionsURL> - <em:targetApplication> <Description> <em:id>xpcshell@tests.mozilla.org</em:id> diff --git a/toolkit/mozapps/extensions/test/addons/test_updateid4_4/bootstrap.js b/toolkit/mozapps/extensions/test/addons/test_updateid4_4/bootstrap.js new file mode 100644 index 000000000..6b1753cb2 --- /dev/null +++ b/toolkit/mozapps/extensions/test/addons/test_updateid4_4/bootstrap.js @@ -0,0 +1,21 @@ +Components.utils.import("resource://gre/modules/Services.jsm"); + +function install(data, reason) { + Services.prefs.setIntPref("bootstraptest.installed_version", 4); + Services.prefs.setIntPref("bootstraptest.install_reason", reason); +} + +function startup(data, reason) { + Services.prefs.setIntPref("bootstraptest.active_version", 4); + 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/extensions/test/addons/test_delay_update_defer_v2/install.rdf b/toolkit/mozapps/extensions/test/addons/test_updateid4_4/install.rdf index 75c7666bb..b354ac5c1 100644 --- a/toolkit/mozapps/extensions/test/addons/test_delay_update_defer_v2/install.rdf +++ b/toolkit/mozapps/extensions/test/addons/test_updateid4_4/install.rdf @@ -4,18 +4,15 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> - <em:id>test_delay_update_defer@tests.mozilla.org</em:id> - <em:version>2.0</em:version> + <em:id>addon4@tests.mozilla.org</em:id> + <em:version>4.0</em:version> + <em:updateURL>http://localhost:4444/data/test_updateid.rdf</em:updateURL> <em:bootstrap>true</em:bootstrap> <!-- Front End MetaData --> - <em:name>Test Delay Update Defer</em:name> + <em:name>Test 4</em:name> <em:description>Test Description</em:description> - <em:iconURL>chrome://foo/skin/icon.png</em:iconURL> - <em:aboutURL>chrome://foo/content/about.xul</em:aboutURL> - <em:optionsURL>chrome://foo/content/options.xul</em:optionsURL> - <em:targetApplication> <Description> <em:id>xpcshell@tests.mozilla.org</em:id> @@ -25,3 +22,4 @@ </em:targetApplication> </Description> +</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/webextension_1/chrome.manifest b/toolkit/mozapps/extensions/test/addons/webextension_1/chrome.manifest deleted file mode 100644 index 16108ce18..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_1/chrome.manifest +++ /dev/null @@ -1 +0,0 @@ -content webex ./ diff --git a/toolkit/mozapps/extensions/test/addons/webextension_1/manifest.json b/toolkit/mozapps/extensions/test/addons/webextension_1/manifest.json deleted file mode 100644 index 2ca5f40f7..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_1/manifest.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "Web Extension Name", - "version": "1.0", - "manifest_version": 2, - "applications": { - "gecko": { - "id": "webextension1@tests.mozilla.org" - } - }, - "icons": { - "48": "icon48.png", - "64": "icon64.png" - } -} diff --git a/toolkit/mozapps/extensions/test/addons/webextension_2/install.rdf b/toolkit/mozapps/extensions/test/addons/webextension_2/install.rdf deleted file mode 100644 index 653481ed0..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_2/install.rdf +++ /dev/null @@ -1,30 +0,0 @@ -<?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>first-webextension2@tests.mozilla.org</em:id> - <em:version>2.0</em:version> - - <em:targetApplication> - <Description> - <em:id>xpcshell@tests.mozilla.org</em:id> - <em:minVersion>1</em:minVersion> - <em:maxVersion>1</em:maxVersion> - </Description> - </em:targetApplication> - - <!-- Front End MetaData --> - <em:name>XPI Add-on 1</em:name> - <em:description>XPI Add-on 1 - Description</em:description> - <em:creator>XPI Add-on 1 - Creator</em:creator> - <em:developer>XPI Add-on 1 - First Developer</em:developer> - <em:translator>XPI Add-on 1 - First Translator</em:translator> - <em:contributor>XPI Add-on 1 - First Contributor</em:contributor> - <em:homepageURL>http://localhost/xpi/1/homepage.html</em:homepageURL> - <em:optionsURL>http://localhost/xpi/1/options.html</em:optionsURL> - <em:aboutURL>http://localhost/xpi/1/about.html</em:aboutURL> - <em:iconURL>http://localhost/xpi/1/icon.png</em:iconURL> - </Description> -</RDF> diff --git a/toolkit/mozapps/extensions/test/addons/webextension_2/manifest.json b/toolkit/mozapps/extensions/test/addons/webextension_2/manifest.json deleted file mode 100644 index 5b470d430..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_2/manifest.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "Web Extension Name", - "version": "1.0", - "manifest_version": 2, - "applications": { - "gecko": { - "id": "last-webextension2@tests.mozilla.org" - } - } -} diff --git a/toolkit/mozapps/extensions/test/addons/webextension_3/_locales/en/messages.json b/toolkit/mozapps/extensions/test/addons/webextension_3/_locales/en/messages.json deleted file mode 100644 index 36868d414..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_3/_locales/en/messages.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": { - "message": "foo ☹", - "description": "foo" - }, - "desc": { - "message": "bar ☹", - "description": "bar" - } -} diff --git a/toolkit/mozapps/extensions/test/addons/webextension_3/_locales/fr/messages.json b/toolkit/mozapps/extensions/test/addons/webextension_3/_locales/fr/messages.json deleted file mode 100644 index c3d02ffde..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_3/_locales/fr/messages.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": { - "message": "le foo ☺", - "description": "foo" - }, - "desc": { - "message": "le bar ☺", - "description": "bar" - } -} diff --git a/toolkit/mozapps/extensions/test/addons/webextension_3/manifest.json b/toolkit/mozapps/extensions/test/addons/webextension_3/manifest.json deleted file mode 100644 index b6ae6f10f..000000000 --- a/toolkit/mozapps/extensions/test/addons/webextension_3/manifest.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "Web Extensiøn __MSG_name__", - "description": "Descriptïon __MSG_desc__ of add-on", - "version": "1.0", - "manifest_version": 2, - "default_locale": "en", - "applications": { - "gecko": { - "id": "webextension3@tests.mozilla.org" - } - } -} |