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

Side by Side Diff: pkg/watcher/test/directory_watcher/linux_test.dart

Issue 99483006: Update the Linux watcher to accommodate changes in [Directory.watch]. (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 | « pkg/watcher/lib/src/directory_watcher/linux.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 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
6 import 'package:watcher/src/directory_watcher/linux.dart'; 6 import 'package:watcher/src/directory_watcher/linux.dart';
7 import 'package:watcher/watcher.dart'; 7 import 'package:watcher/watcher.dart';
8 8
9 import 'shared.dart'; 9 import 'shared.dart';
10 import '../utils.dart'; 10 import '../utils.dart';
11 11
12 main() { 12 main() {
13 initConfig(); 13 initConfig();
14 14
15 watcherFactory = (dir) => new LinuxDirectoryWatcher(dir); 15 watcherFactory = (dir) => new LinuxDirectoryWatcher(dir);
16 16
17 setUp(() { 17 setUp(createSandbox);
18 // Increase the timeout because closing a [Directory.watch] stream blocks
19 // the main isolate for a very long time on Goobuntu, as of kernel
20 // 3.2.5-gg1336 (see issue 14606).
21 currentSchedule.timeout *= 3;
22
23 createSandbox();
24 });
25 18
26 sharedTests(); 19 sharedTests();
27 20
28 test('DirectoryWatcher creates a LinuxDirectoryWatcher on Linux', () { 21 test('DirectoryWatcher creates a LinuxDirectoryWatcher on Linux', () {
29 expect(new DirectoryWatcher('.'), 22 expect(new DirectoryWatcher('.'),
30 new isInstanceOf<LinuxDirectoryWatcher>()); 23 new isInstanceOf<LinuxDirectoryWatcher>());
31 }); 24 });
32 25
33 test('notifies even if the file contents are unchanged', () { 26 test('notifies even if the file contents are unchanged', () {
34 writeFile("a.txt", contents: "same"); 27 writeFile("a.txt", contents: "same");
(...skipping 18 matching lines...) Expand all
53 withPermutations((i, j, k) => 46 withPermutations((i, j, k) =>
54 expectRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")); 47 expectRemoveEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"));
55 }); 48 });
56 49
57 inAnyOrder(() { 50 inAnyOrder(() {
58 withPermutations((i, j, k) => 51 withPermutations((i, j, k) =>
59 expectAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt")); 52 expectAddEvent("dir/sub/sub-$i/sub-$j/file-$k.txt"));
60 }); 53 });
61 }); 54 });
62 } 55 }
OLDNEW
« no previous file with comments | « pkg/watcher/lib/src/directory_watcher/linux.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698