Chromium Code Reviews| Index: tests/isolate/src/APIv2_spawnBrowserTest.dart |
| diff --git a/tests/isolate/src/APIv2_spawnBrowserTest.dart b/tests/isolate/src/APIv2_spawnBrowserTest.dart |
| index 34960b894392cc452ad77ffe296706cecca62ead..ee8ee2008c7a583aa7bbb17b3149faf8b6070a5f 100644 |
| --- a/tests/isolate/src/APIv2_spawnBrowserTest.dart |
| +++ b/tests/isolate/src/APIv2_spawnBrowserTest.dart |
| @@ -4,24 +4,24 @@ |
| // example of spawning an isolate from a closure |
|
eub
2012/02/29 00:20:14
"from a function"
and in standalone test
Siggi Cherem (dart-lang)
2012/02/29 00:37:15
Done.
|
| #library('spawn_tests'); |
| -#import("../../../client/testing/unittest/unittest.dart"); |
| -#import("dart:dom"); // import added so test.dart can treat this as a webtest. |
| +#import('../../../client/testing/unittest/unittest.dart'); |
| +#import('dart:dom'); // import added so test.dart can treat this as a webtest. |
| #import('dart:isolate'); |
| -child(ReceivePort port) { |
| - port.receive((msg, reply) => reply.send("re: $msg")); |
| +child() { |
| + port.receive((msg, reply) => reply.send('re: $msg')); |
|
eub
2012/02/29 00:20:14
Style reaction: sure looks weird to use that tople
Siggi Cherem (dart-lang)
2012/02/29 00:37:15
I agree.
|
| } |
| main() { |
| - asyncTest("message - reply chain", 1, () { |
| + asyncTest('message - reply chain', 1, () { |
| ReceivePort port = new ReceivePort(); |
| port.receive((msg, _) { |
| - expect(msg).equals("re: hi"); |
| + expect(msg).equals('re: hi'); |
| port.close(); |
| callbackDone(); |
| }); |
| - Isolate2 c = new Isolate2.fromCode(child); |
| - c.sendPort.send("hi", port.toSendPort()); |
| + SendPort s = spawnFunction(child); |
| + s.send('hi', port.toSendPort()); |
| }); |
| } |