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

Unified Diff: lib/src/runner/browser/static/host.dart

Issue 1080193002: Add content shell support. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: 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/server.dart ('k') | lib/src/runner/browser/static/host.dart.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/runner/browser/static/host.dart
diff --git a/lib/src/runner/browser/static/host.dart b/lib/src/runner/browser/static/host.dart
index 8f6d6154e4feca2d73d63b5fc238564895760618..72d308e43f3da87571ba1281e910b801fc0bdd33 100644
--- a/lib/src/runner/browser/static/host.dart
+++ b/lib/src/runner/browser/static/host.dart
@@ -7,6 +7,7 @@ library test.runner.browser.host;
import 'dart:async';
import 'dart:convert';
import 'dart:html';
+import 'dart:js' as js;
import 'package:stack_trace/stack_trace.dart';
import 'package:test/src/util/multi_channel.dart';
@@ -65,6 +66,11 @@ import 'package:test/src/util/stream_channel.dart';
/// does mean that the server needs to be sure to nest its [MultiChannel]s at
/// the same place the client does.
void main() {
+ // This tells content_shell not to close immediately after the page has
+ // rendered.
+ var testRunner = js.context['testRunner'];
+ if (testRunner != null) testRunner.callMethod('waitUntilDone', []);
+
runZoned(() {
var serverChannel = _connectToServer();
serverChannel.stream.listen((message) {
« no previous file with comments | « lib/src/runner/browser/server.dart ('k') | lib/src/runner/browser/static/host.dart.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698