Issue #1899 - Make sure the test for it still works

Some hoops to make sure the test still works if the default value for the pref
is false, requiring setting and resetting it and making sure the observers have
time to react to these changes before testing.
This commit is contained in:
Moonchild 2022-05-14 12:22:48 +00:00 committed by roytam1
commit 349d3d96a2
2 changed files with 45 additions and 2 deletions

View file

@ -32,7 +32,7 @@ add_task(function* () {
info("Ensure the pref is true to begin with");
let initial = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (initial != true) {
setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, true);
}
yield addTab("data:text/html;charset=utf8," + encodeURIComponent(TEST_DOC));
@ -58,7 +58,7 @@ add_task(function* () {
info("Ensure the pref is reset to its initial value");
let eventual = Services.prefs.getBoolPref(PREF_ENABLE_MDN_DOCS_TOOLTIP);
if (eventual != initial) {
setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
yield setBooleanPref(PREF_ENABLE_MDN_DOCS_TOOLTIP, initial);
}
});