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

Side by Side Diff: tests/standalone/io/directory_test.dart

Issue 897253002: Ensure that asyncStart is called before starting an async operation in test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 import "dart:async"; 7 import "dart:async";
8 import "dart:io"; 8 import "dart:io";
9 9
10 import "package:async_helper/async_helper.dart"; 10 import "package:async_helper/async_helper.dart";
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 } 117 }
118 Directory.systemTemp.createTemp('dart_directory').then((d) { 118 Directory.systemTemp.createTemp('dart_directory').then((d) {
119 d.delete().then((ignore) { 119 d.delete().then((ignore) {
120 setupListerHandlers(d.list()); 120 setupListerHandlers(d.list());
121 setupListerHandlers(d.list(recursive: true)); 121 setupListerHandlers(d.list(recursive: true));
122 }); 122 });
123 }); 123 });
124 } 124 }
125 125
126 static void testListTooLongName() { 126 static void testListTooLongName() {
127 asyncStart();
127 Directory.systemTemp.createTemp('dart_directory').then((d) { 128 Directory.systemTemp.createTemp('dart_directory').then((d) {
128 var errors = 0; 129 var errors = 0;
129 asyncStart();
130 setupListHandlers(Stream<FileSystemEntity> stream) { 130 setupListHandlers(Stream<FileSystemEntity> stream) {
131 stream.listen( 131 stream.listen(
132 (_) => Expect.fail("Listing of non-existing directory should fail"), 132 (_) => Expect.fail("Listing of non-existing directory should fail"),
133 onError: (error) { 133 onError: (error) {
134 Expect.isTrue(error is FileSystemException); 134 Expect.isTrue(error is FileSystemException);
135 if (++errors == 2) { 135 if (++errors == 2) {
136 d.delete(recursive: true).then((_) { 136 d.delete(recursive: true).then((_) {
137 asyncEnd(); 137 asyncEnd();
138 }); 138 });
139 } 139 }
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 DirectoryTest.testMain(); 617 DirectoryTest.testMain();
618 NestedTempDirectoryTest.testMain(); 618 NestedTempDirectoryTest.testMain();
619 testCreateTempErrorSync(); 619 testCreateTempErrorSync();
620 testCreateTempError(); 620 testCreateTempError();
621 testCreateExistingSync(); 621 testCreateExistingSync();
622 testCreateExisting(); 622 testCreateExisting();
623 testCreateDirExistingFileSync(); 623 testCreateDirExistingFileSync();
624 testCreateDirExistingFile(); 624 testCreateDirExistingFile();
625 testRename(); 625 testRename();
626 } 626 }
OLDNEW
« 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