karma-runner/karma-webdriver-launcher — pull request #15 by j0tunn (2014-08-12 12:37:00+00:00)
Title: Fix: correct methods overriding

Current implementation replaces `ProcessLauncher._start` method, but instead of replacing any method dealing with kill it just adds new listener for `kill` event which just calls callback.
As a result:
- `BaseLauncher._done` method never called and so no event `done` emitted and karma process hangs
- callback called twice:
- first time from `ProcessLauncher`'s kill listener without any error
- second time from `WebDriverInstance`'s kill listener
- nobody removes tmp dir created by `ProcessLauncher`'s start listener

To fix this we shouldn't add any new listener but override any methods called from `ProcessLauncher`'s start/kill listeners:
- `_start`
- `_process.kill`
- `_onKillTimeout`