add comment about why we're doing dumb things with chromedriver

This commit is contained in:
Jonathan Lipps
2013-06-30 10:19:33 -07:00
parent 37150b594c
commit d82880ca6a

View File

@@ -61,11 +61,6 @@ ChromeAndroid.prototype.startChromedriver = function(cb) {
this.proc.stdout.pipe(through(function(data) {
logger.info('[CHROMEDRIVER] ' + data.trim());
if (!alreadyReturned && data.indexOf("Started ChromeDriver") !== -1) {
this.chromedriverStarted = true;
alreadyReturned = true;
cb();
}
}));
this.proc.stderr.pipe(through(function(data) {
@@ -81,10 +76,11 @@ ChromeAndroid.prototype.startChromedriver = function(cb) {
this.onDie();
}.bind(this));
// chromedriver detects that it's not on a TTY and doesn't give any output
// to let us know it's started, so we just assume it started if it didn't
// exit
setTimeout(function() {
if (!alreadyReturned) {
logger.info("We didn't hear from chromedriver in a while; let's " +
"assume it started OK");
cb();
}
}.bind(this), 500);