Skip to content

Commit

Permalink
Firefox launcher use -no-remote
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Oct 4, 2012
1 parent 92fc5ee commit 5364d44
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions lib/launchers/Firefox.js
Expand Up @@ -18,7 +18,7 @@ var FirefoxBrowser = function(id) {
var command = this._getCommand();
var errorOutput = '';

var p = spawn(command, ['-CreateProfile', 'testacular-' + id + ' ' + self._tempDir, '--new-instance']);
var p = spawn(command, ['-CreateProfile', 'testacular-' + id + ' ' + self._tempDir, '-no-remote']);

p.stderr.on('data', function(data) {
errorOutput += data.toString();
Expand All @@ -28,14 +28,11 @@ var FirefoxBrowser = function(id) {
var match = /at\s\'(.*)[\/\\]prefs\.js\'/.exec(errorOutput);

if (match) {
var profile = self._tempDir = match[1];

fs.createWriteStream(profile + '/prefs.js', {flags: 'a'}).write(PREFS);
self._execCommand(command, ['-profile', profile, url]);
} else {
log.warn('Cannot create Firefox profile, reusing current.');
self._execCommand(command, [url]);
self._tempDir = match[1];
}

fs.createWriteStream(self._tempDir + '/prefs.js', {flags: 'a'}).write(PREFS);
self._execCommand(command, [url, '-profile', self._tempDir, '-no-remote']);
});
};
};
Expand Down

0 comments on commit 5364d44

Please sign in to comment.