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

Side by Side Diff: pkg/analyzer/test/file_system/physical_resource_provider_test.dart

Issue 1282873002: Revert a work-around that is now causing bot failures (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months 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
« no previous file with comments | « no previous file | 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library test.physical_file_system; 5 library test.physical_file_system;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:core' hide Resource; 8 import 'dart:core' hide Resource;
9 import 'dart:io' as io; 9 import 'dart:io' as io;
10 10
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 test_watchFile_delete() { 291 test_watchFile_delete() {
292 var path = join(tempPath, 'foo'); 292 var path = join(tempPath, 'foo');
293 var file = new io.File(path); 293 var file = new io.File(path);
294 file.writeAsStringSync('contents 1'); 294 file.writeAsStringSync('contents 1');
295 return _watchingFile(path, (changesReceived) { 295 return _watchingFile(path, (changesReceived) {
296 expect(changesReceived, hasLength(0)); 296 expect(changesReceived, hasLength(0));
297 file.deleteSync(); 297 file.deleteSync();
298 return _delayed(() { 298 return _delayed(() {
299 expect(changesReceived, hasLength(1)); 299 expect(changesReceived, hasLength(1));
300 if (io.Platform.isWindows) { 300 expect(changesReceived[0].type, equals(ChangeType.REMOVE));
301 // TODO(danrubel) https://github.com/dart-lang/sdk/issues/23762
302 // This test fails on Windows but a similar test in the underlying
303 // watcher package passes on Windows.
304 expect(changesReceived[0].type, equals(ChangeType.MODIFY));
305 } else {
306 expect(changesReceived[0].type, equals(ChangeType.REMOVE));
307 }
308 expect(changesReceived[0].path, equals(path)); 301 expect(changesReceived[0].path, equals(path));
309 }); 302 });
310 }); 303 });
311 } 304 }
312 305
313 test_watchFile_modify() { 306 test_watchFile_modify() {
314 var path = join(tempPath, 'foo'); 307 var path = join(tempPath, 'foo');
315 var file = new io.File(path); 308 var file = new io.File(path);
316 file.writeAsStringSync('contents 1'); 309 file.writeAsStringSync('contents 1');
317 return _watchingFile(path, (changesReceived) { 310 return _watchingFile(path, (changesReceived) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 434
442 setUp() { 435 setUp() {
443 tempDirectory = io.Directory.systemTemp.createTempSync('test_resource'); 436 tempDirectory = io.Directory.systemTemp.createTempSync('test_resource');
444 tempPath = tempDirectory.absolute.path; 437 tempPath = tempDirectory.absolute.path;
445 } 438 }
446 439
447 tearDown() { 440 tearDown() {
448 tempDirectory.deleteSync(recursive: true); 441 tempDirectory.deleteSync(recursive: true);
449 } 442 }
450 } 443 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698