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

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

Issue 48713002: Disable test on mac, as it allows listening on non-existing paths. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import "dart:async"; 5 import "dart:async";
6 import "dart:io"; 6 import "dart:io";
7 7
8 import "package:async_helper/async_helper.dart"; 8 import "package:async_helper/async_helper.dart";
9 import "package:expect/expect.dart"; 9 import "package:expect/expect.dart";
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 250
251 new Timer(const Duration(milliseconds: 300), () { 251 new Timer(const Duration(milliseconds: 300), () {
252 sub.cancel(); 252 sub.cancel();
253 asyncEnd(); 253 asyncEnd();
254 dir.deleteSync(recursive: true); 254 dir.deleteSync(recursive: true);
255 }); 255 });
256 } 256 }
257 257
258 258
259 void testWatchNonExisting() { 259 void testWatchNonExisting() {
260 // MacOS allows listening on non-existing paths.
261 if (Platform.isMacOS) return;
260 asyncStart(); 262 asyncStart();
261 new Directory('__some_none_existing_dir__').watch() 263 new Directory('__some_none_existing_dir__').watch()
262 .listen((_) { 264 .listen((_) {
263 Expect.fail('unexpected error'); 265 Expect.fail('unexpected error');
264 }, onError: (e) { 266 }, onError: (e) {
265 asyncEnd(); 267 asyncEnd();
266 Expect.isTrue(e is FileSystemException); 268 Expect.isTrue(e is FileSystemException);
267 }); 269 });
268 } 270 }
269 271
270 272
271 void main() { 273 void main() {
272 if (!FileSystemEntity.isWatchSupported) return; 274 if (!FileSystemEntity.isWatchSupported) return;
273 testWatchCreateFile(); 275 testWatchCreateFile();
274 testWatchModifyFile(); 276 testWatchModifyFile();
275 testWatchMoveFile(); 277 testWatchMoveFile();
276 testWatchDeleteFile(); 278 testWatchDeleteFile();
277 testWatchDeleteDir(); 279 testWatchDeleteDir();
278 testWatchOnlyModifyFile(); 280 testWatchOnlyModifyFile();
279 testMultipleEvents(); 281 testMultipleEvents();
280 testWatchNonRecursive(); 282 testWatchNonRecursive();
281 testWatchNonExisting(); 283 testWatchNonExisting();
282 } 284 }
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