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

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

Issue 47213007: Fix file-system-entity watching on Windows. (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 | « runtime/bin/file_patch.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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 }, onError: (e) { 132 }, onError: (e) {
133 dir.deleteSync(recursive: true); 133 dir.deleteSync(recursive: true);
134 throw e; 134 throw e;
135 }); 135 });
136 136
137 file.deleteSync(); 137 file.deleteSync();
138 } 138 }
139 139
140 140
141 void testWatchDeleteDir() { 141 void testWatchDeleteDir() {
142 // Windows keeps the directory handle open, even though it's deleted. It'll
143 // be flushed completely, once the watcher is closed as well.
144 if (Platform.isWindows) return;
142 var dir = Directory.systemTemp.createTempSync('dart_file_system_watcher'); 145 var dir = Directory.systemTemp.createTempSync('dart_file_system_watcher');
143 var watcher = dir.watch(events: 0); 146 var watcher = dir.watch(events: 0);
144 147
145 asyncStart(); 148 asyncStart();
146 var sub; 149 var sub;
147 sub = watcher.listen((event) { 150 sub = watcher.listen((event) {
148 if (event is FileSystemDeleteEvent) { 151 if (event is FileSystemDeleteEvent) {
149 Expect.isTrue(event.path == dir.path); 152 Expect.isTrue(event.path == dir.path);
150 } 153 }
151 }, onDone: () { 154 }, onDone: () {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 testWatchCreateDir(); 306 testWatchCreateDir();
304 testWatchModifyFile(); 307 testWatchModifyFile();
305 testWatchMoveFile(); 308 testWatchMoveFile();
306 testWatchDeleteFile(); 309 testWatchDeleteFile();
307 testWatchDeleteDir(); 310 testWatchDeleteDir();
308 testWatchOnlyModifyFile(); 311 testWatchOnlyModifyFile();
309 testMultipleEvents(); 312 testMultipleEvents();
310 testWatchNonRecursive(); 313 testWatchNonRecursive();
311 testWatchNonExisting(); 314 testWatchNonExisting();
312 } 315 }
OLDNEW
« no previous file with comments | « runtime/bin/file_patch.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698