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

Unified Diff: tests/isolate/compute_this_script_browser_stream_test.dart

Issue 12919011: Remove streamSpawnUri and mangler. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 7 years, 9 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 | « sdk/lib/isolate/mangler.dart ('k') | tests/isolate/count_stream_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/compute_this_script_browser_stream_test.dart
diff --git a/tests/isolate/compute_this_script_browser_test.dart b/tests/isolate/compute_this_script_browser_stream_test.dart
similarity index 71%
copy from tests/isolate/compute_this_script_browser_test.dart
copy to tests/isolate/compute_this_script_browser_stream_test.dart
index e91d4a960f67ac5cf823f457fae97032a9da5592..a6f51731c205fd23e659629903a2ecdfc4e42057 100644
--- a/tests/isolate/compute_this_script_browser_test.dart
+++ b/tests/isolate/compute_this_script_browser_stream_test.dart
@@ -13,9 +13,12 @@ import '../../pkg/unittest/lib/unittest.dart';
import '../../pkg/unittest/lib/html_config.dart';
child() {
- port.receive((msg, reply) {
- reply.send('re: $msg');
- port.close();
+ var sink;
+ stream.listen((msg) {
+ sink = msg;
+ }, onDone: () {
+ sink.add("done");
+ sink.close();
});
}
@@ -24,13 +27,13 @@ main() {
var script = new ScriptElement();
document.body.append(script);
test('spawn with other script tags in page', () {
- ReceivePort port = new ReceivePort();
- port.receive(expectAsync2((msg, _) {
- expect(msg, equals('re: hi'));
- port.close();
+ var box = new MessageBox();
+ box.stream.listen(expectAsync1((msg) {
+ expect(msg, equals("done"));
}));
- SendPort s = spawnFunction(child);
- s.send('hi', port.toSendPort());
+ IsolateSink s = streamSpawnFunction(child);
+ s.add(box.sink);
+ s.close();
});
}
« no previous file with comments | « sdk/lib/isolate/mangler.dart ('k') | tests/isolate/count_stream_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698