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