| 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();
|
| });
|
| }
|
|
|