toolkit/mozapps/extensions/test/addons/test_bug740612_2/bootstrap.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/extensions/test/addons/test_bug740612_2/bootstrap.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,23 @@
     1.4 +Components.utils.import("resource://gre/modules/Services.jsm");
     1.5 +
     1.6 +const VERSION = "1.0";
     1.7 +
     1.8 +function install(data, reason) {
     1.9 +  Services.prefs.setIntPref("bootstraptest.installed_version", VERSION);
    1.10 +  Services.prefs.setIntPref("bootstraptest.install_reason", reason);
    1.11 +}
    1.12 +
    1.13 +function startup(data, reason) {
    1.14 +  Services.prefs.setIntPref("bootstraptest.active_version", VERSION);
    1.15 +  Services.prefs.setIntPref("bootstraptest.startup_reason", reason);
    1.16 +}
    1.17 +
    1.18 +function shutdown(data, reason) {
    1.19 +  Services.prefs.setIntPref("bootstraptest.active_version", 0);
    1.20 +  Services.prefs.setIntPref("bootstraptest.shutdown_reason", reason);
    1.21 +}
    1.22 +
    1.23 +function uninstall(data, reason) {
    1.24 +  Services.prefs.setIntPref("bootstraptest.installed_version", 0);
    1.25 +  Services.prefs.setIntPref("bootstraptest.uninstall_reason", reason);
    1.26 +}

mercurial