Define and verify default preferences inheritance for Firefox UI Tests



4 years ago
3 years ago


(Reporter: whimboo, Assigned: whimboo)


Firefox Tracking Flags

(Not tracked)


As discussed on my update test conversion PR ( there is a misbehavior in setting our default preferences for the Firefox UI Tests. As it looks like some important prefs which we define in the default prefs are not set at all.

One critical example is the 'app.update.enabled' pref. This is set to `True` even we define it as `False`. That means that Marionette somehow overrides our default setting. I believe that a couple of preferences will be affected by that.

The code as we have right now looks like:

        prefs = kwargs.get('prefs', {})
        runner_prefs = copy.deepcopy(default_prefs)
        kwargs['prefs'] = runner_prefs

As Chris mentioned on the PR the kwargs prefs come from the command line prefs. But given that we set our default prefs here, which are not related at all to the command line, the code is plainly wrong.

Here the priority of prefs:

1. command line prefs from firefox-ui-tests
2. command line prefs from marionette
3. default preferences from firefox-ui-tests
4. default preferences from marionette
5. default preferences from mozprofile

Chris, this has a high priority to get fixed. Will you be able to work on it? We may have to wait until later today when my update tests with the refactoring have been landed.

When working on this please remember to also include the runners/ for a fix.
I don't believe this code to be misbehaving, in particular, I believe something very close to the listed hierarchy is implemented. Please provide a test case that fails so I can understand the missing behavior.
Flags: needinfo?(hskupin)
I seem more discussion about this in the update test PR. I'll see if I can reproduce the issue.
When I add a debugger statement to a random firefox-ui-test, I get:

> (Pdb) self.prefs.get_pref('app.update.enabled')
> False
As discussed on IRC I will have a look at this bug once I'm back. It would be good to also get some harness tests written.
Assignee: nobody → hskupin
Flags: needinfo?(hskupin)
Severity: major → normal
Summary: Fix broken default preferences inheritance for Firefox UI Tests → Define and verify default preferences inheritance for Firefox UI Tests
The inheritance of browser prefs seems to work as expected. I verified with browser.tabs.remote.autostart.
We do not need this bug anymore given that all the pref logic will move to a separate desktop class in Marionette. See bug 1219397.
Last Resolved: 3 years ago
Resolution: --- → WONTFIX
Product: Mozilla QA → Testing
You need to log in before you can comment on or make changes to this bug.