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

Side by Side Diff: pkg/watcher/test/no_subscription/mac_os_test.dart

Issue 66163002: Wrap Directory.watch on Mac OS for the watcher package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review 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 | « pkg/watcher/test/directory_watcher/shared.dart ('k') | pkg/watcher/test/path_set_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:scheduled_test/scheduled_test.dart';
6 import 'package:watcher/src/directory_watcher/mac_os.dart';
7 import 'package:watcher/watcher.dart';
8
9 import 'shared.dart';
10 import '../utils.dart';
11
12 // This is currently failing due to issue 14793. The reason is fairly complex:
13 //
14 // 1. As part of the test, an "unwatched.txt" file is created while there are no
15 // active watchers on the containing directory.
16 //
17 // 2. A watcher is then added.
18 //
19 // 3. The watcher lists the contents of the directory and notices that
20 // "unwatched.txt" already exists.
21 //
22 // 4. Since FSEvents reports past changes (issue 14373), the IO event stream
23 // emits a CREATED event for "unwatched.txt".
24 //
25 // 5. Due to issue 14793, the watcher cannot trust that this is really a CREATED
26 // event and checks the status of "unwatched.txt" on the filesystem against
27 // its internal state.
28 //
29 // 6. "unwatched.txt" exists on the filesystem and the watcher knows about it
30 // internally as well. It assumes this means that the file was modified.
31 //
32 // 7. The watcher emits an unexpected MODIFIED event for "unwatched.txt",
33 // causing the test to fail.
34 //
35 // Once issue 14793 is fixed, this will no longer be the case and the test will
36 // work again.
37
38 main() {
39 initConfig();
40
41 watcherFactory = (dir) => new MacOSDirectoryWatcher(dir);
42
43 setUp(createSandbox);
44
45 sharedTests();
46 }
OLDNEW
« no previous file with comments | « pkg/watcher/test/directory_watcher/shared.dart ('k') | pkg/watcher/test/path_set_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698