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

Side by Side Diff: test/stream_zip_zone_test.dart

Issue 1216313003: pkg/async: cleanup unused variables in tests (Closed) Base URL: https://github.com/dart-lang/async.git@master
Patch Set: Created 5 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
« test/stream_zip_test.dart ('K') | « test/stream_zip_test.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 import "dart:async"; 5 import "dart:async";
6 import "package:test/test.dart"; 6 import "package:test/test.dart";
7 7
8 // Test that stream listener callbacks all happen in the zone where the 8 // Test that stream listener callbacks all happen in the zone where the
9 // listen occurred. 9 // listen occurred.
10 10
(...skipping 23 matching lines...) Expand all
34 Zone newZone1 = Zone.current; 34 Zone newZone1 = Zone.current;
35 StreamSubscription sub; 35 StreamSubscription sub;
36 sub = stream.listen(expectAsync((v) { 36 sub = stream.listen(expectAsync((v) {
37 expect(v, 42); 37 expect(v, 42);
38 expect(Zone.current, newZone1); 38 expect(Zone.current, newZone1);
39 outer.run(() { 39 outer.run(() {
40 sub.onData(expectAsync((v) { 40 sub.onData(expectAsync((v) {
41 expect(v, 37); 41 expect(v, 37);
42 expect(Zone.current, newZone1); 42 expect(Zone.current, newZone1);
43 runZoned(() { 43 runZoned(() {
44 Zone newZone2 = Zone.current;
45 sub.onData(expectAsync((v) { 44 sub.onData(expectAsync((v) {
46 expect(v, 87); 45 expect(v, 87);
47 expect(Zone.current, newZone1); 46 expect(Zone.current, newZone1);
48 })); 47 }));
49 }); 48 });
50 if (controller is SynchronousStreamController) { 49 if (controller is SynchronousStreamController) {
51 scheduleMicrotask(() => controller.add(87)); 50 scheduleMicrotask(() => controller.add(87));
52 } else { 51 } else {
53 controller.add(87); 52 controller.add(87);
54 } 53 }
55 })); 54 }));
56 }); 55 });
57 if (controller is SynchronousStreamController) { 56 if (controller is SynchronousStreamController) {
58 scheduleMicrotask(() => controller.add(37)); 57 scheduleMicrotask(() => controller.add(37));
59 } else { 58 } else {
60 controller.add(37); 59 controller.add(37);
61 } 60 }
62 })); 61 }));
63 }); 62 });
64 controller.add(42); 63 controller.add(42);
65 }); 64 });
66 } 65 }
OLDNEW
« test/stream_zip_test.dart ('K') | « test/stream_zip_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698