mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
Import Tycho's Add-on Manager
This commit is contained in:
parent
d07bf4bba2
commit
a122115666
875 changed files with 111377 additions and 0 deletions
32
toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/bootstrap.js
vendored
Normal file
32
toolkit/mozapps/extensions/test/addons/test_bootstrap1_1/bootstrap.js
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
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);
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<?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>bootstrap1@tests.mozilla.org</em:id>
|
||||
<em:version>1.0</em:version>
|
||||
<em:bootstrap>true</em:bootstrap>
|
||||
|
||||
<!-- Front End MetaData -->
|
||||
<em:name>Test Bootstrap 1</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>
|
||||
</RDF>
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
this.EXPORTED_SYMBOLS = ["VERSION"];
|
||||
|
||||
this.VERSION = 1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue