Bug 1500965 - Fix todo_is in toolkit/components/normandy/test/browser/browser_PreferenceExperiments.js r=Gijs

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Michael Cooper 2018-10-29 19:17:36 +00:00
Родитель a332afed78
Коммит d2bd355768
1 изменённых файлов: 10 добавлений и 5 удалений

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

@ -950,26 +950,31 @@ decorate_task(
name: "defaultBranchRecipe",
preferenceName: "fake.default",
preferenceValue: "experiment value",
branch: "default",
preferenceBranchType: "default",
}),
experimentFactory({
name: "userBranchRecipe",
preferenceName: "fake.user",
preferenceValue: "experiment value",
branch: "user",
preferenceBranchType: "user",
}),
]),
async function testSaveStartupPrefsUserBranch(experiments) {
Assert.deepEqual(Services.prefs.getChildList(startupPrefs), [], "As a prerequisite no startup prefs are set");
await PreferenceExperiments.saveStartupPrefs();
Assert.deepEqual(
Services.prefs.getChildList(startupPrefs),
[`${startupPrefs}.fake.default`],
"only the expected prefs are set",
);
is(
Services.prefs.getCharPref(`${startupPrefs}.fake.default`, "fallback value"),
"experiment value",
"The startup value for fake.default was set",
);
// XXX: Switched to from ok() to todo_is() in Bug 1467712. Follow up in 1500965
// This expects 0, but the test value is 32
todo_is(
is(
Services.prefs.getPrefType(`${startupPrefs}.fake.user`),
Services.prefs.PREF_INVALID,
"The startup value for fake.user was not set",