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

Side by Side Diff: tests/language/await_for_cancel_test.dart

Issue 907043002: More status-updates to async-await related tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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 | « no previous file | tests/language/language_dart2js.status » ('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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 import "dart:async"; 5 import "dart:async";
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import "package:async_helper/async_helper.dart"; 7 import "package:async_helper/async_helper.dart";
8 8
9 bool cancelled; 9 bool cancelled;
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } finally { 44 } finally {
45 Expect.isTrue(cancelled); 45 Expect.isTrue(cancelled);
46 } 46 }
47 } 47 }
48 48
49 test() async { 49 test() async {
50 await test1(); 50 await test1();
51 await test2(); 51 await test2();
52 } 52 }
53 53
54 main() async { 54 main() {
55 asyncStart(); 55 asyncStart();
56 test().then((_) { 56 test().then((_) {
57 asyncEnd(); 57 asyncEnd();
58 }); 58 });
59 } 59 }
60 60
61 61
62 // Create a stream that produces numbers [1, 2, ... ] 62 // Create a stream that produces numbers [1, 2, ... ]
63 StreamController infiniteStreamController() { 63 StreamController infiniteStreamController() {
64 StreamController controller; 64 StreamController controller;
(...skipping 20 matching lines...) Expand all
85 onListen: startTimer, 85 onListen: startTimer,
86 onPause: stopTimer, 86 onPause: stopTimer,
87 onResume: startTimer, 87 onResume: startTimer,
88 onCancel: () { 88 onCancel: () {
89 cancelled = true; 89 cancelled = true;
90 stopTimer(); 90 stopTimer();
91 }); 91 });
92 92
93 return controller; 93 return controller;
94 } 94 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698