diff --git a/client/karma.js b/client/karma.js index 5586bdc9e..0cc7556e0 100644 --- a/client/karma.js +++ b/client/karma.js @@ -236,13 +236,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document) // 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') } - - socket.emit('complete', result || {}) - self.updater.updateTestStatus('complete') - if (returnUrl) { location.href = returnUrl } diff --git a/static/karma.js b/static/karma.js index 23b7c1ae2..b630fe256 100644 --- a/static/karma.js +++ b/static/karma.js @@ -246,13 +246,12 @@ function Karma (updater, socket, iframe, opener, navigator, location, document) // 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') } - - socket.emit('complete', result || {}) - self.updater.updateTestStatus('complete') - if (returnUrl) { location.href = returnUrl }