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

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

Issue 9488004: Fix FileTest that could delete file before a stream on it was closed. (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 9e9f86038a3d56ca7296d92c51055e3f6f21dcee..24da6496943fdf1347da29daaf622f20d3008736 100644
--- a/tests/standalone/src/FileTest.dart
+++ b/tests/standalone/src/FileTest.dart
@@ -771,8 +771,10 @@ class FileTest {
OutputStream output = file.openOutputStreamSync();
output.close();
Expect.throws(() => output.writeFrom(buffer, 0, 12));
- file.deleteSync();
- asyncTestDone("testCloseExceptionStream");
+ output.closeHandler = () {
+ file.deleteSync();
+ asyncTestDone("testCloseExceptionStream");
+ };
};
}
« 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