Closed Bug 1511311 Opened 11 months ago Closed 11 months ago

DeskopInstance and FennecInstance could override specified custom preferences

Categories

(Testing :: Marionette, enhancement, P1)

enhancement

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

Details

Attachments

(1 file)

Both classes in geckoinstance.py aren't able to set custom preferences because those are set by the base class, and then gets overwritten again by the constructor of both classes.

Geckoinstance:

https://searchfox.org/mozilla-central/rev/e22c0d152060f4f8d4ca8904094f15f65a1b6f93/testing/marionette/client/marionette_driver/geckoinstance.py#151-154

DesktopInstance:

https://searchfox.org/mozilla-central/rev/e22c0d152060f4f8d4ca8904094f15f65a1b6f93/testing/marionette/client/marionette_driver/geckoinstance.py#587

Setting preferences this way doesn't seem to work ideal, but I don't think that we should totally refactor that now. Instead make sure that both classes can set custom preferences.

What I only wonder is that we haven't noticed that yet!
Blocks: 1511312
Summary: DeskopInstance and FennecInstance cannot set custom preferences → DeskopInstance and FennecInstance could override specified custom preferences
Custom preferences as passed into both classes via the constructor
are getting set in the base GeckoInstance class. But both the
DesktopInstance and FennecInstance classes could override those
custom preferences if they have the same preference set as
required preference. As such the custom preference doesn't have
any effect.

This patch allows both classes to override required prefs with
a different value.
(In reply to Henrik Skupin (:whimboo) from comment #1)
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=70cc25cd6b7ba904a2aeb3fc63fc08b1c06c3100

The failures in the try build were caused by left-over commits from bug 1508726. We should actually land this patch first.
Blocks: 1508726
Pushed by hskupin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/cd370c35d88d
[marionette] GeckoInstance classes should not overwrite already set custom preferences. r=automatedtester
https://hg.mozilla.org/mozilla-central/rev/cd370c35d88d
Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.