Skip to content
This repository has been archived by the owner on Feb 25, 2022. It is now read-only.

Can't change Firefox preferences of type Boolean #3613

Open
mwobensmith opened this issue Aug 6, 2019 · 7 comments
Open

Can't change Firefox preferences of type Boolean #3613

mwobensmith opened this issue Aug 6, 2019 · 7 comments
Labels
ARCHIVED CLOSED at time of archiving bug Something isn't working and is likely affecting multiple tests Test: helper Issue related to test helper functions

Comments

@mwobensmith
Copy link
Contributor

You can set a preference to a Boolean value, but it only works on new prefs. It can't change the value of an existing Firefox pref.

e.g.

preferences={'app.normandy.first_run': True, 'app.normandy.first_run1': True }

Result in prefs.js:

user_pref("app.normandy.first_run", false);
user_pref("app.normandy.first_run1", true);

(Migrated from here.)

@tracywalker tracywalker added bug Something isn't working and is likely affecting multiple tests Test: helper Issue related to test helper functions labels Aug 6, 2019
@mwobensmith
Copy link
Contributor Author

Needs more investigation. Not sure if the issue is as above, or if Fx is overwriting whatever we set.

@tracywalker
Copy link
Collaborator

How does mozrunner successfully make all the settings it applies stick?

@mwobensmith
Copy link
Contributor Author

Actually, I'm not sure that we have proven a bug in Iris or mozprofile here. The mechanism that mozprofile uses adds entries to the user.js file in the profile. We can see that part is working just by opening that file. However, upon opening prefs.js - which is written back to disk by Firefox after startup - we see that some values don't "stick," but that only represents the state of Firefox when it quit.

Give me an example of a Boolean pref that you need to work on one of the tests. We can run this manually by adding it to an empty profile's user.js file. Then, we can examine the outcome and see if Firefox respected the value, and/or wrote it to prefs.js. If it doesn't work at all, then that could be a Firefox bug.

@tracywalker
Copy link
Collaborator

browser.search.widget.inNavBar = true is a config that would be useful in many of the search tests. As of now, tests are setting this through the about:config UI.

@mwobensmith
Copy link
Contributor Author

I tried adding this to user.js like so:

user_pref("browser.search.widget.inNavBar", true);

But when Firefox opened and I checked about:config, it was still set to false. So, it appears that there are things we cannot set in a profile before launching Firefox. This appears to be a Firefox issue. Would be worth searching Bugzilla to see if it's known.

@tracywalker
Copy link
Collaborator

See https://bugzilla.mozilla.org/show_bug.cgi?id=1543752 . There is discussion about what is going on with these files.

@mwobensmith
Copy link
Contributor Author

This looks bad for us. I imagine other people rely on mozprofile and would be affected by this change.

@cknowles-admin cknowles-admin added the ARCHIVED CLOSED at time of archiving label Feb 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
ARCHIVED CLOSED at time of archiving bug Something isn't working and is likely affecting multiple tests Test: helper Issue related to test helper functions
Projects
None yet
Development

No branches or pull requests

3 participants