diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js index f6fa0cc011d..c6136bf05c7 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/setup.js @@ -570,7 +570,7 @@ let TestPilotSetup = { task.defaultUrl, false, function() { /* on close callback (Bug 575767) -- when the "new study * starting" popup is dismissed, then the study can start. */ - task.changeStatus(TaskConstants.STATUS_IN_PROGRESS, true); + task.changeStatus(TaskConstants.STATUS_STARTING, true); TestPilotSetup.reloadRemoteExperiments(); }); return; diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js index 5706f3a377a..30bbead9357 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/tasks.js @@ -619,11 +619,14 @@ TestPilotExperiment.prototype = { if (uuid.indexOf("{") == 0) { uuid = uuid.substring(1, (uuid.length - 1)); } - // clear the data before starting. - this._dataStore.wipeAllData(); - this.changeStatus(TaskConstants.STATUS_STARTING, true); Application.prefs.setValue(GUID_PREF_PREFIX + this._id, uuid); - this.onExperimentStartup(); + // clear the data before starting. + let self = this; + this._dataStore.wipeAllData(function() { + // Experiment is now in progress. + self.changeStatus(TaskConstants.STATUS_IN_PROGRESS, true); + self.onExperimentStartup(); + }); } // What happens when a test finishes: