From 628c4a5d8f8f3914e34f22f4d8ebf9cb3b7f9004 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Mon, 7 Feb 2022 12:04:55 -0800 Subject: [PATCH] Try and disable Firefox "quick suggest onboarding" thing Tests that use Firefox started failing recently because Firefox grew yet another stupid pop-up thing that *might* show on start up, this appears to be trying to get you to sign up for a feature called "quick suggest". After half an hour trawling the relevant code, this is my best guess as to how to turn it off. Don't know for sure if it works because the thing doesn't pop up every time, but it at least doesn't make things worse. Signed-off-by: Adam Williamson --- lib/utils.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/utils.pm b/lib/utils.pm index 64efb2c8..ecf58658 100644 --- a/lib/utils.pm +++ b/lib/utils.pm @@ -414,8 +414,15 @@ sub disable_firefox_studies { # and also disables the password manager stuff so that doesn't # break password entry: # https://bugzilla.mozilla.org/show_bug.cgi?id=1635833 + # and *also* disables the "quick suggest onboarding dialog" + # (god I am starting to hate this crap): + # https://bugzilla.mozilla.org/show_bug.cgi?id=1703903 assert_script_run 'mkdir -p $(rpm --eval %_libdir)/firefox/distribution'; assert_script_run 'printf \'{"policies": {"DisableFirefoxStudies": true, "OfferToSaveLogins": false}}\' > $(rpm --eval %_libdir)/firefox/distribution/policies.json'; + assert_script_run 'mkdir -p $(rpm --eval %_libdir)/firefox/browser/defaults/preferences'; + # it's not at all clear from the code which of these actually gets + # used, so we set them all just in case + assert_script_run 'printf "pref(\'browser.urlbar.quicksuggest.shouldShowOnboardingDialog\', false);\npref(\'quickSuggestShouldShowOnboardingDialog\', false);\npref(\'browser.urlbar.quickSuggestShouldShowOnboardingDialog\', false);" > $(rpm --eval %_libdir)/firefox/browser/defaults/preferences/openqa-overrides.js'; } sub repos_mirrorlist {