diff --git a/lib/browser.ts b/lib/browser.ts index 85d620451..ef9b401bb 100644 --- a/lib/browser.ts +++ b/lib/browser.ts @@ -417,8 +417,8 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver { * Call waitForAngularEnabled() without passing a value to read the current * state without changing it. */ - waitForAngularEnabled(enabled: boolean|wdpromise.Promise = null): - wdpromise.Promise { + waitForAngularEnabled(enabled: boolean|wdpromise.Promise = null): boolean + |wdpromise.Promise { if (enabled != null) { const ret = this.driver.controlFlow().execute(() => { return wdpromise.when(enabled).then((enabled: boolean) => { @@ -433,7 +433,7 @@ export class ProtractorBrowser extends AbstractExtendedWebDriver { this.internalIgnoreSynchronization = !enabled; return ret; } - return wdpromise.when(!this.ignoreSynchronization); + return !this.ignoreSynchronization; } /** diff --git a/lib/runner.ts b/lib/runner.ts index 359e7428c..59dc6b7b2 100644 --- a/lib/runner.ts +++ b/lib/runner.ts @@ -290,7 +290,7 @@ export class Runner extends EventEmitter { browser_.forkNewDriverInstance = (useSameUrl: boolean, copyMockModules: boolean, copyConfigUpdates = true) => { - let newBrowser = this.createBrowser(plugins); + let newBrowser = this.createBrowser(plugins, browser_); if (copyMockModules) { newBrowser.mockModules_ = browser_.mockModules_; }