| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 })); | 85 })); |
| 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 |
| 96 // Bug 8836 Re-enable once Dartium supports DateTime properties. |
| 97 //e.getMetadata(expectAsync1((Metadata metadata) { |
| 98 // var changeTime = metadata.modificationTime; |
| 99 // expect(new DateTime.now().difference(changeTime).inSeconds, |
| 100 // lessThan(60)); |
| 101 //})); |
| 95 }), | 102 }), |
| 96 errorCallback: (e) { | 103 errorCallback: (e) { |
| 97 fail('Got file error: ${e.code}'); | 104 fail('Got file error: ${e.code}'); |
| 98 }); | 105 }); |
| 99 }); | 106 }); |
| 100 } | 107 } |
| 101 }); | 108 }); |
| 102 } | 109 } |
| OLD | NEW |