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

Side by Side Diff: pkg/watcher/test/ready/shared.dart

Issue 46843003: Wrap Directory.watch on linux 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/ready/polling_test.dart ('k') | pkg/watcher/test/ready_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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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';
6
7 import 'package:scheduled_test/scheduled_test.dart'; 5 import 'package:scheduled_test/scheduled_test.dart';
8 6
9 import 'utils.dart'; 7 import '../utils.dart';
10 8
11 main() { 9 sharedTests() {
12 initConfig();
13
14 setUp(createSandbox);
15
16 test('ready does not complete until after subscription', () { 10 test('ready does not complete until after subscription', () {
17 var watcher = createWatcher(waitForReady: false); 11 var watcher = createWatcher(waitForReady: false);
18 12
19 var ready = false; 13 var ready = false;
20 watcher.ready.then((_) { 14 watcher.ready.then((_) {
21 ready = true; 15 ready = true;
22 }); 16 });
23 17
24 // Should not be ready yet. 18 // Should not be ready yet.
25 schedule(() { 19 schedule(() {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 ready = true; 89 ready = true;
96 }); 90 });
97 }); 91 });
98 92
99 // Should be back to not ready. 93 // Should be back to not ready.
100 schedule(() { 94 schedule(() {
101 expect(ready, isFalse); 95 expect(ready, isFalse);
102 }); 96 });
103 }); 97 });
104 } 98 }
OLDNEW
« no previous file with comments | « pkg/watcher/test/ready/polling_test.dart ('k') | pkg/watcher/test/ready_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698