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

Unified Diff: tests/standalone/src/FileTest.dart

Issue 9490010: Update FileTest.dart to aboid potential Windows failure (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/FileTest.dart
diff --git a/tests/standalone/src/FileTest.dart b/tests/standalone/src/FileTest.dart
index 0e8ddd2e9e991d55ad311a52294987410c8b03a2..2ce8ac4a2b44f1b2acc84b210f3e9aa3084e5647 100644
--- a/tests/standalone/src/FileTest.dart
+++ b/tests/standalone/src/FileTest.dart
@@ -129,16 +129,17 @@ class FileTest {
input = file.openInputStream();
input.dataHandler = () {
bytesRead = input.readInto(buffer2, 0, 42);
- Expect.isTrue(input.closed);
Expect.equals(42, bytesRead);
// Now compare the two buffers to check if they are identical.
for (int i = 0; i < buffer1.length; i++) {
Expect.equals(buffer1[i], buffer2[i]);
}
- // Delete the output file.
- file.deleteSync();
- Expect.isFalse(file.existsSync());
- asyncTestDone("testReadWriteStream");
+ input.closeHandler = () {
+ // Delete the output file.
+ file.deleteSync();
+ Expect.isFalse(file.existsSync());
+ asyncTestDone("testReadWriteStream");
+ };
};
};
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698