| OLD | NEW |
| 1 library fileapi; | 1 library fileapi; |
| 2 import '../../pkg/unittest/lib/unittest.dart'; | 2 import '../../pkg/unittest/lib/unittest.dart'; |
| 3 import '../../pkg/unittest/lib/html_individual_config.dart'; | 3 import '../../pkg/unittest/lib/html_individual_config.dart'; |
| 4 import 'dart:html'; | 4 import 'dart:html'; |
| 5 | 5 |
| 6 void fail(message) { | 6 void fail(message) { |
| 7 guardAsync(() { | 7 guardAsync(() { |
| 8 expect(false, isTrue, reason: message); | 8 expect(false, isTrue, reason: message); |
| 9 }); | 9 }); |
| 10 } | 10 } |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 }); | 86 }); |
| 87 | 87 |
| 88 test('fileCreate', () { | 88 test('fileCreate', () { |
| 89 fs.root.getFile( | 89 fs.root.getFile( |
| 90 'file4', | 90 'file4', |
| 91 options: {'create': true}, | 91 options: {'create': true}, |
| 92 successCallback: expectAsync1((FileEntry e) { | 92 successCallback: expectAsync1((FileEntry e) { |
| 93 expect(e.name, equals('file4')); | 93 expect(e.name, equals('file4')); |
| 94 expect(e.isFile, isTrue); | 94 expect(e.isFile, isTrue); |
| 95 | 95 |
| 96 // Bug 8836 Re-enable once Dartium supports DateTime properties. | 96 e.getMetadata(expectAsync1((Metadata metadata) { |
| 97 //e.getMetadata(expectAsync1((Metadata metadata) { | 97 var changeTime = metadata.modificationTime; |
| 98 // var changeTime = metadata.modificationTime; | 98 expect(new DateTime.now().difference(changeTime).inSeconds, |
| 99 // expect(new DateTime.now().difference(changeTime).inSeconds, | 99 lessThan(60)); |
| 100 // lessThan(60)); | 100 })); |
| 101 //})); | |
| 102 }), | 101 }), |
| 103 errorCallback: (e) { | 102 errorCallback: (e) { |
| 104 fail('Got file error: ${e.code}'); | 103 fail('Got file error: ${e.code}'); |
| 105 }); | 104 }); |
| 106 }); | 105 }); |
| 107 } | 106 } |
| 108 }); | 107 }); |
| 109 } | 108 } |
| OLD | NEW |