Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Unified Diff: tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart

Issue 9521007: isolates: remove Isolate2 interface, add top-level spawn functions, more comments (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/lib/isolate.dart ('k') | tests/isolate/src/APIv2_spawnBrowserTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart
diff --git a/tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart b/tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart
index dcf80a03bd882fd7c96b304bd99f8a2861f08e1b..9caab9db44787ffd1320fc22dbcba9f4a08682ed 100644
--- a/tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart
+++ b/tests/isolate/src/APIv2_spawnBrowserNegativeTest.dart
@@ -4,24 +4,24 @@
// Negative test to make sure that we are reaching all assertions.
#library('spawn_tests');
-#import("../../../client/testing/unittest/unittest.dart");
-#import("dart:dom"); // import added so test.dart can treat this as a webtest.
-#import("dart:isolate");
+#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'));
}
main() {
- asyncTest("message - reply chain", 1, () {
+ asyncTest('message - reply chain', 1, () {
ReceivePort port = new ReceivePort();
port.receive((msg, _) {
- expect(msg).equals("re: hello"); // should be hi, not hello
+ expect(msg).equals('re: hello'); // should be hi, not hello
port.close();
callbackDone();
});
- Isolate2 c = new Isolate2.fromCode(child);
- c.sendPort.send("hi", port.toSendPort());
+ SendPort s = spawnFunction(child);
+ s.send('hi', port.toSendPort());
});
}
« no previous file with comments | « runtime/lib/isolate.dart ('k') | tests/isolate/src/APIv2_spawnBrowserTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698