Index: tests/isolate/browser/compute_this_script_browser_test.dart |
diff --git a/tests/isolate/browser/compute_this_script_browser_test.dart b/tests/isolate/browser/compute_this_script_browser_test.dart |
index 74cd118e6f8d2b5b28df411d1f4c1870de81bd3c..2b71451aeefbc1139acf582dfc392672b62e1819 100644 |
--- a/tests/isolate/browser/compute_this_script_browser_test.dart |
+++ b/tests/isolate/browser/compute_this_script_browser_test.dart |
@@ -12,11 +12,10 @@ import 'dart:isolate'; |
import 'package:unittest/unittest.dart'; |
import 'package:unittest/html_config.dart'; |
-child() { |
- port.receive((msg, reply) { |
- reply.send('re: $msg'); |
- port.close(); |
- }); |
+child(var message) { |
+ var data = message[0]; |
+ var reply = message[1]; |
+ reply.send('re: $data'); |
} |
main() { |
@@ -25,12 +24,11 @@ main() { |
document.body.append(script); |
test('spawn with other script tags in page', () { |
ReceivePort port = new ReceivePort(); |
- port.receive(expectAsync2((msg, _) { |
+ port.listen(expectAsync1((msg) { |
expect(msg, equals('re: hi')); |
port.close(); |
})); |
- SendPort s = spawnFunction(child); |
- s.send('hi', port.toSendPort()); |
+ Isolate.spawn(child, ['hi', port.sendPort]); |
}); |
} |