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

Side by Side Diff: sdk/lib/_internal/pub/test/error_group_test.dart

Issue 19841002: Remove calls to [new Future] work around issue 11911. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review change. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 error_group_test; 5 library error_group_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'package:unittest/unittest.dart'; 9 import 'package:unittest/unittest.dart';
10 10
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 expect(errorGroup.done, throwsFormatException); 240 expect(errorGroup.done, throwsFormatException);
241 controller.addError(new FormatException()); 241 controller.addError(new FormatException());
242 }); 242 });
243 243
244 test('should pass a signaled exception to the stream if it has a listener ' 244 test('should pass a signaled exception to the stream if it has a listener '
245 'and should unsubscribe that stream', () { 245 'and should unsubscribe that stream', () {
246 // errorGroup shouldn't top-level the exception 246 // errorGroup shouldn't top-level the exception
247 expect(stream.first, throwsFormatException); 247 expect(stream.first, throwsFormatException);
248 errorGroup.signalError(new FormatException()); 248 errorGroup.signalError(new FormatException());
249 249
250 expect(new Future(() { 250 expect(newFuture(() {
251 controller.add('value'); 251 controller.add('value');
252 }), completes); 252 }), completes);
253 }); 253 });
254 254
255 test('should notify the error group of a signaled exception even if the ' 255 test('should notify the error group of a signaled exception even if the '
256 'stream has a listener', () { 256 'stream has a listener', () {
257 expect(stream.first, throwsFormatException); 257 expect(stream.first, throwsFormatException);
258 expect(errorGroup.done, throwsFormatException); 258 expect(errorGroup.done, throwsFormatException);
259 errorGroup.signalError(new FormatException()); 259 errorGroup.signalError(new FormatException());
260 }); 260 });
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 completion(equals(['value1', 'value2']))); 437 completion(equals(['value1', 'value2'])));
438 controller..add('value1')..add('value2')..close(); 438 controller..add('value1')..add('value2')..close();
439 439
440 expect(signal.future.then((_) { 440 expect(signal.future.then((_) {
441 // shouldn't cause a top-level exception 441 // shouldn't cause a top-level exception
442 completer.completeError(new FormatException()); 442 completer.completeError(new FormatException());
443 }), completes); 443 }), completes);
444 }); 444 });
445 }); 445 });
446 } 446 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698