preferences_remote_agent.py (834B)
1 from support.helpers import read_user_preferences 2 from tests.support.sync import Poll 3 4 5 def test_remote_agent_recommended_preferences_applied(browser): 6 # Marionette cannot be enabled for this test because it will also set the 7 # recommended preferences. Therefore only enable Remote Agent protocols. 8 current_browser = browser(use_bidi=True) 9 10 def pref_is_set(_): 11 preferences = read_user_preferences(current_browser.profile.profile, "prefs.js") 12 return preferences.get("remote.prefs.recommended.applied", False) 13 14 # Without Marionette enabled preferences cannot be retrieved via script evaluation yet. 15 wait = Poll( 16 None, 17 timeout=5, 18 ignored_exceptions=IOError, 19 message="""Preference "remote.prefs.recommended.applied" is not true""", 20 ) 21 wait.until(pref_is_set)