Bug 1648964 - Pass double-dash options to Firefox, r=webdriver-reviewers,whimboo

Differential Revision: https://phabricator.services.mozilla.com/D81532
This commit is contained in:
James Graham
2020-07-27 13:10:29 +00:00
parent 3906081e08
commit 1580908410
3 changed files with 6 additions and 7 deletions

View File

@@ -236,8 +236,8 @@ impl AndroidHandler {
// TODO: Allow to write custom arguments and preferences from moz:firefoxOptions
let mut config = Config {
args: Value::Sequence(vec![
Value::String("-marionette".into()),
Value::String("-profile".into()),
Value::String("--marionette".into()),
Value::String("--profile".into()),
Value::String(self.profile.display().to_string()),
]),
env: Mapping::new(),
@@ -342,7 +342,7 @@ impl AndroidHandler {
intent_arguments.push("--es".to_owned());
intent_arguments.push("args".to_owned());
intent_arguments
.push(format!("-marionette -profile {}", self.profile.display()).to_owned());
.push(format!("--marionette --profile {}", self.profile.display()).to_owned());
debug!("Launching {}/{}", process.package, process.activity);
process

View File

@@ -82,7 +82,7 @@ impl<'a> FirefoxCapabilities<'a> {
let version_regexp = Regex::new(r#"Mozilla Firefox [0-9]+\.[0-9]+(?:[a-z][0-9]+)?"#)
.expect("Error parsing version regexp");
let output = Command::new(binary)
.args(&["-version"])
.args(&["--version"])
.stdout(Stdio::piped())
.spawn()
.and_then(|child| child.wait_with_output())

View File

@@ -252,10 +252,9 @@ impl MarionetteHandler {
let mut runner = FirefoxRunner::new(&binary, profile);
// double-dashed flags are not accepted on Windows systems
runner.arg("-marionette");
runner.arg("--marionette");
if self.settings.jsdebugger {
runner.arg("-jsdebugger");
runner.arg("--jsdebugger");
}
if let Some(args) = options.args.as_ref() {
runner.args(args);