Skip to content

Commit

Permalink
[js] Move Profile generation out of GeckoDriver path (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLorenzo authored and jleyba committed Jun 6, 2016
1 parent d5a8804 commit 3e6e103
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions javascript/node/selenium-webdriver/firefox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -337,13 +337,6 @@ class Driver extends webdriver.WebDriver {
binary = new Binary(binary);
}

let profile = new Profile;
if (caps.has(Capability.PROFILE)) {
profile = caps.get(Capability.PROFILE);
caps.delete(Capability.PROFILE);
}

let freePort = portprober.findFreePort();
let serverUrl, onQuit;

if (caps.get(Capability.MARIONETTE)
Expand All @@ -353,6 +346,13 @@ class Driver extends webdriver.WebDriver {
onQuit = () => service.kill();

} else {
let profile = new Profile;
if (caps.has(Capability.PROFILE)) {
profile = caps.get(Capability.PROFILE);
caps.delete(Capability.PROFILE);
}

let freePort = portprober.findFreePort();
let preparedProfile =
freePort.then(port => prepareProfile(profile, port));
let command = preparedProfile.then(dir => binary.launch(dir));
Expand Down

0 comments on commit 3e6e103

Please sign in to comment.