Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1220)

Unified Diff: lib/src/runner/browser/server.dart

Issue 1080903003: Detect an expired content shell and emit a nice error. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/runner/browser/content_shell.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/server.dart
diff --git a/lib/src/runner/browser/server.dart b/lib/src/runner/browser/server.dart
index fcfea2fdb2b846b237d60e591365b8be77954b90..6c1d52d0e038d8a64c85af0e25ba6ff3f16441a2 100644
--- a/lib/src/runner/browser/server.dart
+++ b/lib/src/runner/browser/server.dart
@@ -250,7 +250,15 @@ void main() {
return _browserManagerFor(browser).then((browserManager) {
if (_closed) return null;
return browserManager.loadSuite(path, suiteUrl);
- }).then((suite) => suite.change(platform: browser.name));
+ }).then((suite) {
+ if (_closed) return null;
+ if (suite != null) return suite.change(platform: browser.name);
+
+ // If the browser manager fails to load a suite and the server isn't
+ // closed, it's probably because the browser failed. We emit the failure
+ // here to ensure that it gets surfaced.
+ return _browsers[browser].onExit;
+ });
});
}
« no previous file with comments | « lib/src/runner/browser/content_shell.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698