startup the study

This commit is contained in:
groovecoder 2017-05-02 11:04:30 -05:00
parent e499ff5711
commit 54c598e22e

View file

@ -1,6 +1,8 @@
const self = require("sdk/self"); const self = require("sdk/self");
const shield = require("./lib/shield/index");
const { when: unload } = require("sdk/system/unload"); const { when: unload } = require("sdk/system/unload");
const tabs = require("sdk/tabs");
const shield = require("./lib/shield/index");
const studyConfig = { const studyConfig = {
name: self.addonId, name: self.addonId,
@ -17,15 +19,21 @@ const studyConfig = {
class ContainersStudy extends shield.Study { class ContainersStudy extends shield.Study {
isEligible () { isEligible () {
console.log("ContainersStudy.isEligible()");
} }
whenEligible () { whenEligible () {
console.log("ContainersStudy.whenEligible()");
} }
whenInstalled () { whenInstalled () {
console.log("ContainersStudy.whenInstalled()");
console.log("shield variation: ", this.variation);
tabs.open(`data:text/html, Thank you for helping us study Containers in Firefox. You are in the ${this.variation} variation.`);
} }
cleanup(reason) { cleanup(reason) {
console.log("ContainersStudy.cleanup()");
console.log(reason); console.log(reason);
} }
} }
@ -33,3 +41,5 @@ class ContainersStudy extends shield.Study {
const thisStudy = new ContainersStudy(studyConfig); const thisStudy = new ContainersStudy(studyConfig);
unload((reason) => thisStudy.shutdown(reason)); unload((reason) => thisStudy.shutdown(reason));
thisStudy.startup(self.loadReason);