Bug 580422 - Test Pilot Raw Data log randomly resets. r+a=dtownsend

This commit is contained in:
Jono S Xia 2010-07-26 14:34:00 -07:00
Родитель d9b7e04daa
Коммит 43124bdd41
2 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -570,7 +570,7 @@ let TestPilotSetup = {
task.defaultUrl, false, function() { task.defaultUrl, false, function() {
/* on close callback (Bug 575767) -- when the "new study /* on close callback (Bug 575767) -- when the "new study
* starting" popup is dismissed, then the study can start. */ * starting" popup is dismissed, then the study can start. */
task.changeStatus(TaskConstants.STATUS_IN_PROGRESS, true); task.changeStatus(TaskConstants.STATUS_STARTING, true);
TestPilotSetup.reloadRemoteExperiments(); TestPilotSetup.reloadRemoteExperiments();
}); });
return; return;

Просмотреть файл

@ -619,11 +619,14 @@ TestPilotExperiment.prototype = {
if (uuid.indexOf("{") == 0) { if (uuid.indexOf("{") == 0) {
uuid = uuid.substring(1, (uuid.length - 1)); 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); 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: // What happens when a test finishes: