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

Unified Diff: pkg/async/test/stream_zip_zone_test.dart

Issue 882713009: Make synchronous broadcast StreamController throw if adding event while adding event. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update version number. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/async/pubspec.yaml ('k') | sdk/lib/async/broadcast_stream_controller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/async/test/stream_zip_zone_test.dart
diff --git a/pkg/async/test/stream_zip_zone_test.dart b/pkg/async/test/stream_zip_zone_test.dart
index 0b0c4bc53377f87ccebcfc41abd0bd246ed2d622..70851b4f32eca7dbe2c954d6ab28c8a715d17e41 100644
--- a/pkg/async/test/stream_zip_zone_test.dart
+++ b/pkg/async/test/stream_zip_zone_test.dart
@@ -47,10 +47,18 @@ void testStream(String name, StreamController controller, Stream stream) {
expect(Zone.current, newZone1);
}));
});
- controller.add(87);
+ if (controller is SynchronousStreamController) {
+ scheduleMicrotask(() => controller.add(87));
+ } else {
+ controller.add(87);
+ }
}));
});
- controller.add(37);
+ if (controller is SynchronousStreamController) {
+ scheduleMicrotask(() => controller.add(37));
+ } else {
+ controller.add(37);
+ }
}));
});
controller.add(42);
« no previous file with comments | « pkg/async/pubspec.yaml ('k') | sdk/lib/async/broadcast_stream_controller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698