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

Side by Side Diff: tests/lib/async/intercept_schedule_microtask6_test.dart

Issue 48483002: Remove deprecated parts of dart:async. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comment. Created 7 years, 1 month 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/async/zone.dart ('k') | tests/lib/async/schedule_microtask_test.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) 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 import 'package:async_helper/async_helper.dart'; 5 import 'package:async_helper/async_helper.dart';
6 import "package:expect/expect.dart"; 6 import "package:expect/expect.dart";
7 import 'dart:async'; 7 import 'dart:async';
8 import 'catch_errors.dart'; 8 import 'catch_errors.dart';
9 9
10 class A { 10 class A {
(...skipping 16 matching lines...) Expand all
27 events.add("async handler done"); 27 events.add("async handler done");
28 } 28 }
29 29
30 onErrorHandler(e) { 30 onErrorHandler(e) {
31 events.add("error: $e"); 31 events.add("error: $e");
32 } 32 }
33 33
34 main() { 34 main() {
35 asyncStart(); 35 asyncStart();
36 36
37 // Test that runZonedExperimental works when async, error and done are used. 37 // Test that runZonedScheduleMicrotask works when async, error and done
38 // are used.
38 var result = runZonedScheduleMicrotask( 39 var result = runZonedScheduleMicrotask(
39 body, 40 body,
40 onScheduleMicrotask: onAsyncHandler, 41 onScheduleMicrotask: onAsyncHandler,
41 onError: onErrorHandler); 42 onError: onErrorHandler);
42 events.add("after"); 43 events.add("after");
43 Timer.run(() { 44 Timer.run(() {
44 Expect.listEquals( 45 Expect.listEquals(
45 ["body entry", 46 ["body entry",
46 "async handler", "async handler done", 47 "async handler", "async handler done",
47 "after", 48 "after",
48 "run async body", 49 "run async body",
49 "error: foo"], 50 "error: foo"],
50 events); 51 events);
51 asyncEnd(); 52 asyncEnd();
52 }); 53 });
53 } 54 }
OLDNEW
« no previous file with comments | « sdk/lib/async/zone.dart ('k') | tests/lib/async/schedule_microtask_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698