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

Unified Diff: tests/standalone/package/package_isolate_test.dart

Issue 11636022: Use different reply-ports for each test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Better names and status-file update.wq Created 8 years 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 | « no previous file | tests/standalone/standalone.status » ('j') | tests/standalone/standalone.status » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/package/package_isolate_test.dart
diff --git a/tests/standalone/package/package_isolate_test.dart b/tests/standalone/package/package_isolate_test.dart
index fad10c847ec0982c3d50a0999a8ce0d58780ce55..f826c5fdca1b50be9095951b808d01c12e65a237 100644
--- a/tests/standalone/package/package_isolate_test.dart
+++ b/tests/standalone/package/package_isolate_test.dart
@@ -10,33 +10,35 @@ import 'dart:isolate';
import '../../../pkg/unittest/lib/unittest.dart';
expectResponse() {
- port.receive(expectAsync2((msg, r) {
+ var receivePort = new ReceivePort();
+ receivePort.receive(expectAsync2((msg, r) {
expect('isolate', msg);
expect('main', shared.output);
- port.close();
+ receivePort.close();
}));
+ return receivePort;
}
void main() {
test("package in spawnFunction()", () {
- expectResponse();
+ var replyPort = expectResponse().toSendPort();
shared.output = 'main';
var sendPort = spawnFunction(isolate_main);
- sendPort.send("sendPort", port.toSendPort());
+ sendPort.send("sendPort", replyPort);
});
test("package in spawnUri() of sibling file", () {
- expectResponse();
+ var replyPort = expectResponse().toSendPort();
shared.output = 'main';
var sendPort = spawnUri('sibling_isolate.dart');
- sendPort.send('sendPort', port.toSendPort());
+ sendPort.send('sendPort', replyPort);
});
test("package in spawnUri() of file in folder", () {
- expectResponse();
+ var replyPort = expectResponse().toSendPort();
shared.output = 'main';
var sendPort = spawnUri('test_folder/folder_isolate.dart');
- sendPort.send('sendPort', port.toSendPort());
+ sendPort.send('sendPort', replyPort);
});
}
« no previous file with comments | « no previous file | tests/standalone/standalone.status » ('j') | tests/standalone/standalone.status » ('J')

Powered by Google App Engine
This is Rietveld 408576698