| Index: tests/isolate/src/APIv2_spawnFunctionNegativeTest.dart
|
| diff --git a/tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart b/tests/isolate/src/APIv2_spawnFunctionNegativeTest.dart
|
| similarity index 72%
|
| rename from tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart
|
| rename to tests/isolate/src/APIv2_spawnFunctionNegativeTest.dart
|
| index e5c7bd6f07ab35644d9ee65298a2183046536eba..f6dce79bada8cb422aa6e4cebb98a823eb14dfac 100644
|
| --- a/tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart
|
| +++ b/tests/isolate/src/APIv2_spawnFunctionNegativeTest.dart
|
| @@ -4,24 +4,20 @@
|
|
|
| // Negative test to make sure that we are reaching all assertions.
|
| #library('spawn_tests');
|
| -#import('../../../lib/unittest/unittest.dart');
|
| -#import('../../../lib/unittest/dom_config.dart');
|
| -#import('dart:dom'); // import added so test.dart can treat this as a webtest.
|
| #import('dart:isolate');
|
| +#import('../../../lib/unittest/unittest.dart');
|
|
|
| child() {
|
| port.receive((msg, reply) => reply.send('re: $msg'));
|
| }
|
|
|
| main() {
|
| - useDomConfiguration();
|
| - asyncTest('message - reply chain', 1, () {
|
| + test('message - reply chain', () {
|
| ReceivePort port = new ReceivePort();
|
| - port.receive((msg, _) {
|
| - expect(msg).equals('re: hello'); // should be hi, not hello
|
| + port.receive(expectAsync2((msg, _) {
|
| port.close();
|
| - callbackDone();
|
| - });
|
| + expect(msg).equals('re: hello'); // should be hi, not hello
|
| + }));
|
|
|
| SendPort s = spawnFunction(child);
|
| s.send('hi', port.toSendPort());
|
|
|