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

Unified Diff: tests/standalone/src/io/FileTest.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
Index: tests/standalone/src/io/FileTest.dart
diff --git a/tests/standalone/src/io/FileTest.dart b/tests/standalone/src/io/FileTest.dart
index f691c5d1a6425fb2525d7837bfb342d279a69384..f58ab943c1d3369eddd3ef70a084af54e45b88cd 100644
--- a/tests/standalone/src/io/FileTest.dart
+++ b/tests/standalone/src/io/FileTest.dart
@@ -457,8 +457,9 @@ class FileTest {
asyncTestStarted();
// Port to verify that the test completes.
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((message, replyTo) {
+ port.close();
Expect.equals(1, message);
asyncTestDone("testDirectory");
});
@@ -856,8 +857,9 @@ class FileTest {
}
static void testReadAsBytes() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((result, replyTo) {
+ port.close();
Expect.equals(42, result);
});
var name = getFilename("tests/vm/data/fixed_length_file");
@@ -879,8 +881,9 @@ class FileTest {
}
static void testReadAsText() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((result, replyTo) {
+ port.close();
Expect.equals(1, result);
});
var name = getFilename("tests/vm/data/fixed_length_file");
@@ -931,8 +934,9 @@ class FileTest {
}
static void testReadAsLines() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((result, replyTo) {
+ port.close();
Expect.equals(42, result);
});
var name = getFilename("tests/vm/data/fixed_length_file");
@@ -962,8 +966,9 @@ class FileTest {
static void testReadAsErrors() {
- var port = new ReceivePort.singleShot();
+ var port = new ReceivePort();
port.receive((message, _) {
+ port.close();
Expect.equals(1, message);
});
var f = new File('.');

Powered by Google App Engine
This is Rietveld 408576698