diff --git a/client/karma.js b/client/karma.js index 0cc7556e0..64264d1d0 100644 --- a/client/karma.js +++ b/client/karma.js @@ -232,20 +232,15 @@ function Karma (updater, socket, iframe, opener, navigator, location, document) resultsBuffer = [] } - // A test could have incorrectly issued a navigate. Wait one turn - // to ensure the error from an incorrect navigate is processed. - var config = this.config - setTimeout(function () { - socket.emit('complete', result || {}) - if (config.clearContext) { - navigateContextTo('about:blank') - } else { - self.updater.updateTestStatus('complete') - } - if (returnUrl) { - location.href = returnUrl - } - }) + socket.emit('complete', result || {}) + if (this.config.clearContext) { + navigateContextTo('about:blank') + } else { + self.updater.updateTestStatus('complete') + } + if (returnUrl) { + location.href = returnUrl + } } this.info = function (info) { diff --git a/static/karma.js b/static/karma.js index 50be7e472..b88001881 100644 --- a/static/karma.js +++ b/static/karma.js @@ -242,20 +242,15 @@ function Karma (updater, socket, iframe, opener, navigator, location, document) resultsBuffer = [] } - // A test could have incorrectly issued a navigate. Wait one turn - // to ensure the error from an incorrect navigate is processed. - var config = this.config - setTimeout(function () { - socket.emit('complete', result || {}) - if (config.clearContext) { - navigateContextTo('about:blank') - } else { - self.updater.updateTestStatus('complete') - } - if (returnUrl) { - location.href = returnUrl - } - }) + socket.emit('complete', result || {}) + if (this.config.clearContext) { + navigateContextTo('about:blank') + } else { + self.updater.updateTestStatus('complete') + } + if (returnUrl) { + location.href = returnUrl + } } this.info = function (info) {