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

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

Issue 9249018: Fix error in tests/standalone/FileTest.dart, where files were not closed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test exclusion in status file. Created 8 years, 11 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 | « client/tests/client/client.status ('k') | 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 d30977c4b95ad306c6e69893374b72eb371612f1..b2556d2d0e79973cb08747baa16cf1fcb4c2980b 100644
--- a/tests/standalone/src/FileTest.dart
+++ b/tests/standalone/src/FileTest.dart
@@ -305,6 +305,7 @@ class FileTest {
file.createSync();
RandomAccessFile openedFile = file.openSync();
Expect.throws(() => openedFile.readByteSync(), (e) => e is FileIOException);
+ openedFile.closeSync();
file.deleteSync();
}
@@ -321,10 +322,13 @@ class FileTest {
};
openedFile.errorHandler = (String err) {
Expect.isTrue(err.indexOf("failed") != -1);
- file.deleteHandler = () {
- asyncTestDone();
+ openedFile.closeHandler = () {
+ file.deleteHandler = () {
+ asyncTestDone();
+ };
+ file.delete();
};
- file.delete();
+ openedFile.close();
};
openedFile.readByte();
};
« no previous file with comments | « client/tests/client/client.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698