tests-bustage fix for bug 981689 (the code relies on the current-version preference being always set, which isn't true for testing-prefs-branches)

This commit is contained in:
Asaf Romano 2014-05-06 11:43:59 +03:00
parent abc4ff83f5
commit be20723336

View File

@ -532,7 +532,7 @@ this.DataReportingPolicy.prototype = Object.freeze({
set dataSubmissionPolicyAccepted(value) {
this._prefs.set("dataSubmissionPolicyAccepted", !!value);
if (!!value) {
let currentPolicyVersion = this._prefs.get("currentPolicyVersion");
let currentPolicyVersion = this._prefs.get("currentPolicyVersion", 1);
this._prefs.set("dataSubmissionPolicyAcceptedVersion", currentPolicyVersion);
} else {
this._prefs.reset("dataSubmissionPolicyAcceptedVersion");