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

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

Issue 9316066: Implement recursive directory deletion. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixing comment. 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
« runtime/bin/directory_win.cc ('K') | « runtime/bin/file_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/DirectoryTest.dart
diff --git a/tests/standalone/src/DirectoryTest.dart b/tests/standalone/src/DirectoryTest.dart
index 035a38c47732988cde3dfb061bebaf9350fd2bf3..5ba0d99ffdbe12afeac0976ce018c0bf1f816893 100644
--- a/tests/standalone/src/DirectoryTest.dart
+++ b/tests/standalone/src/DirectoryTest.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
@@ -35,12 +35,15 @@ class DirectoryTest {
Expect.isTrue(completed, "directory listing did not complete");
Expect.isTrue(listedDir, "directory not found");
Expect.isTrue(listedFile, "file not found");
- f.deleteHandler = () {
- // TODO(ager): use async directory deletion API when available.
- subDirectory.deleteSync();
- directory.deleteSync();
+ directory.delete(recursive: true);
Bill Hesse 2012/02/02 17:24:39 I think we need some major tests for the new recur
Mads Ager (google) 2012/02/03 11:48:54 I have added some more tests. It is hard to do mor
+ directory.deleteHandler = () {
+ f.exists();
+ f.existsHandler = (exists) => Expect.isFalse(exists);
+ directory.exists();
+ directory.existsHandler = (exists) => Expect.isFalse(exists);
+ subDirectory.exists();
+ subDirectory.existsHandler = (exists) => Expect.isFalse(exists);
};
- f.delete();
};
directory.errorHandler = (error) {
« runtime/bin/directory_win.cc ('K') | « runtime/bin/file_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698