-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
prefs, marionette: remove or move remaining required prefs
When a user provides a profile that wnats to override browser.warnOnQuit, browser.tabs.warnOnClose, or browser.showQuitWarning, we should allow users to do stupid things. We should not prevent the profile's preferences from being applied. dom.ipc.cpows.forbid-unsafe-from-browser is being removed because all targetted Firefoxen are not using any unsafe CPOWs in Marionette code. marionette.defaultPrefs.enabled is superfluous for as long as the --marionette flag is being passed to the Firefox binary. Remaining relevant prefs from prefs::REQUIRED have been merged into prefs::DEFAULT. This is a follow-up to the discussion around #423.
- Loading branch information
Showing
2 changed files
with
10 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this commit broke Marionette for me on Windows in Firefoxen 52.0 and 53.0b9, though I don't really understand why. It looks like Marionette does not get enabled, so Geckodriver just hangs while waiting to connect to Marionette.
Interestingly, in the Browser Console, there's a
Warning: unrecognized command line flag --marionette
; that warning appears even when using older Geckodriver versions (say, 0.14.0). So perhaps that's related, considering the comment on line 231?(I tried passing the
"marionette.defaultPrefs.enabled": true
pref in mymoz:firefoxOptions
but that didn't seem to work, surprisingly. That could be my fault somewhere else in our stack, though.)2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for alerting us! That
--marionette
is unrecognised is very surprising to me. Normally, when you pass an unknown flag Firefox accepts it without warnings, and I’ve never seen the “unrecognized command lined flag” warning before.What happens if you start Firefox 52.0 or 53.0b9 manually with
firefox --marionette
? I would expect it to display some message in stdout saying that it is listening on port 2828.If you pass
marionette.defaultPrefs.enabled
as part ofprefs
inmoz:firefoxOptions
, that should be exactly equivalent to the old behaviour, before I removedprefs::REQUIRED
in this patch.2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(FWIW I apologise for these constant regressions, but I expect this to improve somewhat once https://bugzilla.mozilla.org/show_bug.cgi?id=1340637 and the follow-up bug to hook geckodriver up to WPT in-tree lands.)
2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On Windows, the same thing happens -- no log messages from Marionette are printed, and the Browser Console complains about the unknown flag.
If I do it on Linux, I do get the
1491951219139 Marionette INFO Listening on port 2828
message I expect.(Just from reading the code, I would definitely think that passing the
pref
throughmoz:firefoxOptions
is supposed to work, so I probably have a problem elsewhere in our code that's supposed to plumb that capability through.)2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means Firefox appears to have different behaviour for dealing with command line flags on Windows and Linux systems. This is… worrying. I will investigate further in the morning.
I recently landed https://hg.mozilla.org/mozilla-central/rev/16ae5cf72cd6 on mozilla-central, and which is available in Firefox 53 onwards, that lists the
--marionette
flag in--help
. I don’t know if this should have any impact on Windows.But judging from the information you have given me, it looks like we need to set the
marionette.enabled
pref irregardless of passing--marionette
to Firefox, if only for backwards compatibility.2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Windows systems only accept X11-style single-dashed flags, like
-marionette
, and not GNU style--marionette
?2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that seems to be the case. If I change mozrunner to pass
-marionette
, then everything works. Fascinating.2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Geckodriver is ignoring the
prefs
that I'm setting in the caps. Will file a separate issue.2e0054b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have filed #640 to fix the
-marionette
flag issue.