| 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 12 matching lines...) Expand all Loading... |
| 23 getFileSystem() { | 23 getFileSystem() { |
| 24 window.requestFileSystem(Window.TEMPORARY, 100, | 24 window.requestFileSystem(Window.TEMPORARY, 100, |
| 25 expectAsync1((FileSystem fileSystem) { | 25 expectAsync1((FileSystem fileSystem) { |
| 26 fs = fileSystem; | 26 fs = fileSystem; |
| 27 }), | 27 }), |
| 28 (e) { | 28 (e) { |
| 29 fail('Got file error: ${e.code}'); | 29 fail('Got file error: ${e.code}'); |
| 30 }); | 30 }); |
| 31 } | 31 } |
| 32 | 32 |
| 33 group('unsupported throws', () { | 33 group('unsupported_throws', () { |
| 34 test('requestFileSystem', () { | 34 test('requestFileSystem', () { |
| 35 var expectation = FileSystem.supported ? returnsNormally : throws; | 35 var expectation = FileSystem.supported ? returnsNormally : throws; |
| 36 expect(() { | 36 expect(() { |
| 37 window.requestFileSystem(Window.TEMPORARY, 100, (_) {}, (_) {}); | 37 window.requestFileSystem(Window.TEMPORARY, 100, (_) {}, (_) {}); |
| 38 }, expectation); | 38 }, expectation); |
| 39 }); | 39 }); |
| 40 }); | 40 }); |
| 41 | 41 |
| 42 group('getDirectory', () { | 42 group('getDirectory', () { |
| 43 if (FileSystem.supported) { | 43 if (FileSystem.supported) { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 errorCallback: (e) { | 96 errorCallback: (e) { |
| 97 fail('Got file error: ${e.code}'); | 97 fail('Got file error: ${e.code}'); |
| 98 }); | 98 }); |
| 99 }); | 99 }); |
| 100 } | 100 } |
| 101 }); | 101 }); |
| 102 } | 102 } |
| OLD | NEW |