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

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

Issue 1219863004: (TBR) patch test on Windows pending investigation (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 test_watchFile_delete() { 290 test_watchFile_delete() {
291 var path = join(tempPath, 'foo'); 291 var path = join(tempPath, 'foo');
292 var file = new io.File(path); 292 var file = new io.File(path);
293 file.writeAsStringSync('contents 1'); 293 file.writeAsStringSync('contents 1');
294 return _watchingFile(path, (changesReceived) { 294 return _watchingFile(path, (changesReceived) {
295 expect(changesReceived, hasLength(0)); 295 expect(changesReceived, hasLength(0));
296 file.deleteSync(); 296 file.deleteSync();
297 return _delayed(() { 297 return _delayed(() {
298 expect(changesReceived, hasLength(1)); 298 expect(changesReceived, hasLength(1));
299 expect(changesReceived[0].type, equals(ChangeType.REMOVE)); 299 if (io.Platform.isWindows) {
300 // TODO(danrubel) https://github.com/dart-lang/sdk/issues/23762
301 // This test fails on Windows but a similar test in the underlying
302 // watcher package passes on Windows.
303 expect(changesReceived[0].type, equals(ChangeType.MODIFY));
304 } else {
305 expect(changesReceived[0].type, equals(ChangeType.REMOVE));
306 }
300 expect(changesReceived[0].path, equals(path)); 307 expect(changesReceived[0].path, equals(path));
301 }); 308 });
302 }); 309 });
303 } 310 }
304 311
305 test_watchFile_modify() { 312 test_watchFile_modify() {
306 var path = join(tempPath, 'foo'); 313 var path = join(tempPath, 'foo');
307 var file = new io.File(path); 314 var file = new io.File(path);
308 file.writeAsStringSync('contents 1'); 315 file.writeAsStringSync('contents 1');
309 return _watchingFile(path, (changesReceived) { 316 return _watchingFile(path, (changesReceived) {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 440
434 setUp() { 441 setUp() {
435 tempDirectory = io.Directory.systemTemp.createTempSync('test_resource'); 442 tempDirectory = io.Directory.systemTemp.createTempSync('test_resource');
436 tempPath = tempDirectory.absolute.path; 443 tempPath = tempDirectory.absolute.path;
437 } 444 }
438 445
439 tearDown() { 446 tearDown() {
440 tempDirectory.deleteSync(recursive: true); 447 tempDirectory.deleteSync(recursive: true);
441 } 448 }
442 } 449 }
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