Skip to content

Commit

Permalink
fix(launcher): compatibility with old launchers
Browse files Browse the repository at this point in the history
  • Loading branch information
vojtajina committed Dec 24, 2013
1 parent 9e0e385 commit ffb7480
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions lib/launcher.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
var log = require('./logger').create('launcher');
var q = require('q');

var baseDecorator = require('./launchers/base').decoratorFactory;
var captureTimeoutDecorator = require('./launchers/capture_timeout').decoratorFactory;
Expand Down Expand Up @@ -66,8 +67,16 @@ var Launcher = function(emitter, injector) {
return;
}

// TODO(vojta): remove in v1.0
browser.forceKill = browser.forceKill || browser.kill;
// TODO(vojta): remove in v1.0 (BC for old launchers)
if (!browser.forceKill) {
browser.forceKill = function() {
var deferred = q.defer();
this.kill(function() {
deferred.resolve();
});
return deferred.promise;
};
}

log.info('Starting browser %s', browser.name);
browser.start(url);
Expand Down

0 comments on commit ffb7480

Please sign in to comment.