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

Side by Side Diff: lib/src/runner/browser/iframe_test.dart

Issue 1044953004: Gracefully handle tests that print. (Closed) Base URL: git@github.com:dart-lang/unittest@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 unified diff | Download patch
« no previous file with comments | « lib/src/runner/browser/iframe_listener.dart ('k') | lib/src/runner/reporter/compact.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library unittest.runner.browser.iframe_test; 5 library unittest.runner.browser.iframe_test;
6 6
7 import '../../backend/live_test.dart'; 7 import '../../backend/live_test.dart';
8 import '../../backend/live_test_controller.dart'; 8 import '../../backend/live_test_controller.dart';
9 import '../../backend/metadata.dart'; 9 import '../../backend/metadata.dart';
10 import '../../backend/state.dart'; 10 import '../../backend/state.dart';
(...skipping 25 matching lines...) Expand all
36 36
37 testChannel.stream.listen((message) { 37 testChannel.stream.listen((message) {
38 if (message['type'] == 'error') { 38 if (message['type'] == 'error') {
39 var asyncError = RemoteException.deserialize(message['error']); 39 var asyncError = RemoteException.deserialize(message['error']);
40 controller.addError(asyncError.error, asyncError.stackTrace); 40 controller.addError(asyncError.error, asyncError.stackTrace);
41 } else if (message['type'] == 'state-change') { 41 } else if (message['type'] == 'state-change') {
42 controller.setState( 42 controller.setState(
43 new State( 43 new State(
44 new Status.parse(message['status']), 44 new Status.parse(message['status']),
45 new Result.parse(message['result']))); 45 new Result.parse(message['result'])));
46 } else if (message['type'] == 'print') {
47 controller.print(message['line']);
46 } else { 48 } else {
47 assert(message['type'] == 'complete'); 49 assert(message['type'] == 'complete');
48 controller.completer.complete(); 50 controller.completer.complete();
49 } 51 }
50 }); 52 });
51 }); 53 });
52 return controller.liveTest; 54 return controller.liveTest;
53 } 55 }
54 } 56 }
OLDNEW
« no previous file with comments | « lib/src/runner/browser/iframe_listener.dart ('k') | lib/src/runner/reporter/compact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698