openPreferencesViaOpenPreferencesAPI assumes pref pane initialization is synchronous, but experimental prefs init is asynchronous, which breaks browser_basic_rebuild_fonts_test.js
Categories
(Firefox :: Settings UI, defect, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox92 | --- | affected |
People
(Reporter: Gijs, Unassigned)
References
Details
expects that once the sync or privacy pane loads, that's it.
Unfortunately, the init
for experimental prefs is async (!) and can thus finish later. If/when that happens, it calls updateAllElements
some more, which re-sets prefs. If tests try to change prefs with delayprefsave
before this call happens, their changes get reset and this breaks tests.
The patch in bug 1722561 will fix this by removing the updateAllElements
call, but it still seems wise to update the helper to be more robust and wait for the experimental prefs init to have finished. My comment on the patch review:
Can we make
preferencesBindings.js
fire a custom event on the document root, and usewaitForEvent
here ifupdateQueued
is true, to avoid the yuckywaitForCondition
?
seems like it might be a worthwhile addition to this helper as well...
Updated•3 years ago
|
Reporter | ||
Comment 1•3 years ago
|
||
I have a WIP patch but it causes leaks: https://treeherder.mozilla.org/jobs?repo=try&revision=a8713d27cd06696daa8696d4d0238e87c66d74db&selectedTaskRun=UT6mvFQuS8u0SwyFXWFOUw.0
Not sure if keeping this as a mentored bug is likely to pan out given that... Jared, wdyt?
Description
•