Bug 1194529 - Revert to the previous value of the TEST_ONLY_REAUTH pref instead of clearing it after receiving the notification. r=MattN

This was causing subsequent tests to fail when a pref was set via browser.ini.

Differential Revision: https://phabricator.services.mozilla.com/D61750

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jared Wein 2020-03-12 14:47:30 +00:00
Родитель cc57cbe8d2
Коммит 304f8c423a
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -45,6 +45,7 @@ var OSKeyStoreTestUtils = {
async waitForOSKeyStoreLogin(login = false) { async waitForOSKeyStoreLogin(login = false) {
const str = login ? "pass" : "cancel"; const str = login ? "pass" : "cancel";
let prevValue = Services.prefs.getStringPref(this.TEST_ONLY_REAUTH, "");
Services.prefs.setStringPref(this.TEST_ONLY_REAUTH, str); Services.prefs.setStringPref(this.TEST_ONLY_REAUTH, str);
await TestUtils.topicObserved( await TestUtils.topicObserved(
@ -52,6 +53,6 @@ var OSKeyStoreTestUtils = {
(subject, data) => data == str (subject, data) => data == str
); );
Services.prefs.setStringPref(this.TEST_ONLY_REAUTH, ""); Services.prefs.setStringPref(this.TEST_ONLY_REAUTH, prevValue);
}, },
}; };