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

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

Issue 88063002: Don't report file-system move events on Mac OS, and use no-defer to avoid past events. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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 | « sdk/lib/io/file_system_entity.dart ('k') | 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 import "package:path/path.dart"; 10 import "package:path/path.dart";
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }, onError: (e) { 79 }, onError: (e) {
80 dir.deleteSync(recursive: true); 80 dir.deleteSync(recursive: true);
81 throw e; 81 throw e;
82 }); 82 });
83 83
84 file.writeAsStringSync('a'); 84 file.writeAsStringSync('a');
85 } 85 }
86 86
87 87
88 void testWatchMoveFile() { 88 void testWatchMoveFile() {
89 // Mac OS doesn't report move events.
90 if (Platform.isMacOS) return;
89 var dir = Directory.systemTemp.createTempSync('dart_file_system_watcher'); 91 var dir = Directory.systemTemp.createTempSync('dart_file_system_watcher');
90 var file = new File(join(dir.path, 'file')); 92 var file = new File(join(dir.path, 'file'));
91 file.createSync(); 93 file.createSync();
92 94
93 var watcher = dir.watch(); 95 var watcher = dir.watch();
94 96
95 asyncStart(); 97 asyncStart();
96 var sub; 98 var sub;
97 sub = watcher.listen((event) { 99 sub = watcher.listen((event) {
98 if (event is FileSystemMoveEvent) { 100 if (event is FileSystemMoveEvent) {
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 testWatchModifyFile(); 336 testWatchModifyFile();
335 testWatchMoveFile(); 337 testWatchMoveFile();
336 testWatchDeleteFile(); 338 testWatchDeleteFile();
337 testWatchDeleteDir(); 339 testWatchDeleteDir();
338 testWatchOnlyModifyFile(); 340 testWatchOnlyModifyFile();
339 testMultipleEvents(); 341 testMultipleEvents();
340 testWatchNonRecursive(); 342 testWatchNonRecursive();
341 testWatchNonExisting(); 343 testWatchNonExisting();
342 testWatchMoveSelf(); 344 testWatchMoveSelf();
343 } 345 }
OLDNEW
« no previous file with comments | « sdk/lib/io/file_system_entity.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698