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

Side by Side Diff: runtime/tests/dart/src/DirectoryTest.dart

Issue 8232005: Use isolates for directory listing. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove the TODO comment Created 9 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // 4 //
5 // Directory listing test. 5 // Directory listing test.
6 6
7 class DirectoryTest { 7 class DirectoryTest {
8 static void testListing() { 8 static void testListing() {
9 bool listedSomething = false; 9 bool listedSomething = false;
10 Directory directory = new Directory.open("."); 10 Directory directory = new Directory.open(".");
(...skipping 10 matching lines...) Expand all
21 Expect.isTrue(completed, "directory listing did not complete"); 21 Expect.isTrue(completed, "directory listing did not complete");
22 Expect.isTrue(listedSomething, "empty directory"); 22 Expect.isTrue(listedSomething, "empty directory");
23 directory.close(); 23 directory.close();
24 }); 24 });
25 25
26 directory.setDirErrorHandler((dir) { 26 directory.setDirErrorHandler((dir) {
27 Expect.fail("error listing directory"); 27 Expect.fail("error listing directory");
28 }); 28 });
29 29
30 directory.list(); 30 directory.list();
31
32 // Listing is asynchronous, so nothing should be listed at this
33 // point.
34 Expect.isFalse(listedSomething);
31 } 35 }
32 36
33 static void testMain() { 37 static void testMain() {
34 testListing(); 38 testListing();
35 } 39 }
36 } 40 }
37 41
38 main() { 42 main() {
39 DirectoryTest.testMain(); 43 DirectoryTest.testMain();
40 } 44 }
OLDNEW
« runtime/bin/directory_impl.dart ('K') | « runtime/bin/directory_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698