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

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

Issue 10270013: Fix test to make sure that all opened file descriptors for a File (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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/io/FileTest.dart
diff --git a/tests/standalone/src/io/FileTest.dart b/tests/standalone/src/io/FileTest.dart
index c9efbcd9522a52753b368272f094c22f70766174..30c0396928c0fa68130576bb270569a15ccf787e 100644
--- a/tests/standalone/src/io/FileTest.dart
+++ b/tests/standalone/src/io/FileTest.dart
@@ -310,23 +310,27 @@ class FileTest {
outStream.write(buffer);
outStream.onNoPendingWrites = () {
outStream.close();
- File file2 = new File(filename);
- OutputStream appendingOutput =
- file2.openOutputStream(FileMode.APPEND);
- appendingOutput.write(buffer);
- appendingOutput.onNoPendingWrites = () {
- appendingOutput.close();
- File file3 = new File(filename);
- file3.open(FileMode.READ, (RandomAccessFile openedFile) {
- openedFile.length((int length) {
- Expect.equals(content.length * 2, length);
- openedFile.close(() {
- file3.delete(() {
- asyncTestDone("testOutputStreamWriteAppend");
+ outStream.onClosed = () {
+ File file2 = new File(filename);
+ OutputStream appendingOutput =
+ file2.openOutputStream(FileMode.APPEND);
+ appendingOutput.write(buffer);
+ appendingOutput.onNoPendingWrites = () {
+ appendingOutput.close();
+ appendingOutput.onClosed = () {
+ File file3 = new File(filename);
+ file3.open(FileMode.READ, (RandomAccessFile openedFile) {
+ openedFile.length((int length) {
+ Expect.equals(content.length * 2, length);
+ openedFile.close(() {
+ file3.delete(() {
+ asyncTestDone("testOutputStreamWriteAppend");
+ });
+ });
});
});
- });
- });
+ };
+ };
};
};
asyncTestStarted();
« 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