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

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

Issue 9652001: SendPort + ReceivePort changes: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 9 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 | « tests/isolate/src/ConstructorTest.dart ('k') | tests/isolate/src/Isolate3NegativeTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/isolate/src/CrossIsolateMessageTest.dart
diff --git a/tests/isolate/src/CrossIsolateMessageTest.dart b/tests/isolate/src/CrossIsolateMessageTest.dart
index 403ae2aaf26755f1d54eba2ed03b30f04918b49a..5b97533ff2c6c0b315f1a45be389e8ceb4308d21 100644
--- a/tests/isolate/src/CrossIsolateMessageTest.dart
+++ b/tests/isolate/src/CrossIsolateMessageTest.dart
@@ -20,7 +20,7 @@ class CrossIsolate1 extends Isolate {
otherIsolate.send(msg + 58, null); // 100.
receivePort.close();
});
- replyTo.send('ready', receivePort.toSendPort());
+ replyTo.send(['ready', receivePort.toSendPort()]);
this.port.close();
});
}
@@ -39,7 +39,7 @@ class CrossIsolate2 extends Isolate {
mainIsolate.send(msg + 399, null); // 499.
receivePort.close();
});
- replyTo.send('ready', receivePort.toSendPort());
+ replyTo.send(['ready', receivePort.toSendPort()]);
this.port.close();
});
}
@@ -51,17 +51,17 @@ test(TestExpectation expect) {
expect.completes(new CrossIsolate2().spawn()).then((SendPort port2) {
// Create a new receive port and send it to isolate2.
ReceivePort myPort = new ReceivePort();
- port2.call(myPort.toSendPort()).receive(expect.runs2((msg, port2b) {
- Expect.equals("ready", msg);
+ port2.call(myPort.toSendPort()).then(expect.runs1((msg) {
+ Expect.equals("ready", msg[0]);
// Send port of isolate2 to isolate1.
- port1.call(port2b).receive(expect.runs2((msg, port1b) {
- Expect.equals("ready", msg);
+ port1.call(msg[1]).then(expect.runs1((msg) {
+ Expect.equals("ready", msg[0]);
myPort.receive(expect.runs2((msg, replyTo) {
Expect.equals(499, msg);
expect.succeeded();
myPort.close();
}));
- port1b.send(42, null);
+ msg[1].send(42, null);
}));
}));
});
« no previous file with comments | « tests/isolate/src/ConstructorTest.dart ('k') | tests/isolate/src/Isolate3NegativeTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698