| Index: tests/html/fileapi_test.dart
|
| diff --git a/tests/html/fileapi_test.dart b/tests/html/fileapi_test.dart
|
| index 82aad86d6c7074747492cd90cf1fb3430beef33e..f753b013def2a1bceedbebef89288f5c8387aa22 100644
|
| --- a/tests/html/fileapi_test.dart
|
| +++ b/tests/html/fileapi_test.dart
|
| @@ -25,6 +25,7 @@ main() {
|
| group('getDirectory', () {
|
|
|
| test('directoryDoesntExist', () {
|
| + /* OPTIONALS
|
| fs.root.getDirectory(
|
| 'directory2',
|
| options: {},
|
| @@ -34,9 +35,20 @@ main() {
|
| errorCallback: expectAsync1((FileError e) {
|
| expect(e.code, equals(FileError.NOT_FOUND_ERR));
|
| }));
|
| + */
|
| + fs.root.getDirectory(
|
| + 'directory2',
|
| + {},
|
| + (e) {
|
| + fail('Should not be reached');
|
| + },
|
| + expectAsync1((FileError e) {
|
| + expect(e.code, equals(FileError.NOT_FOUND_ERR));
|
| + }));
|
| });
|
|
|
| test('directoryCreate', () {
|
| + /* OPTIONALS
|
| fs.root.getDirectory(
|
| 'directory3',
|
| options: {'create': true},
|
| @@ -46,12 +58,23 @@ main() {
|
| errorCallback: (e) {
|
| fail('Got file error: ${e.code}');
|
| });
|
| + */
|
| + fs.root.getDirectory(
|
| + 'directory3',
|
| + {'create': true},
|
| + expectAsync1((DirectoryEntry e) {
|
| + expect(e.name, equals('directory3'));
|
| + }),
|
| + (e) {
|
| + fail('Got file error: ${e.code}');
|
| + });
|
| });
|
| });
|
|
|
| group('getFile', () {
|
|
|
| test('fileDoesntExist', () {
|
| + /* OPTIONALS
|
| fs.root.getFile(
|
| 'file2',
|
| options: {},
|
| @@ -61,9 +84,20 @@ main() {
|
| errorCallback: expectAsync1((FileError e) {
|
| expect(e.code, equals(FileError.NOT_FOUND_ERR));
|
| }));
|
| + */
|
| + fs.root.getFile(
|
| + 'file2',
|
| + {},
|
| + (e) {
|
| + fail('Should not be reached');
|
| + },
|
| + expectAsync1((FileError e) {
|
| + expect(e.code, equals(FileError.NOT_FOUND_ERR));
|
| + }));
|
| });
|
|
|
| test('fileCreate', () {
|
| + /* OPTIONALS
|
| fs.root.getFile(
|
| 'file4',
|
| options: {'create': true},
|
| @@ -75,5 +109,17 @@ main() {
|
| fail('Got file error: ${e.code}');
|
| });
|
| });
|
| + */
|
| + fs.root.getFile(
|
| + 'file4',
|
| + {'create': true},
|
| + expectAsync1((FileEntry e) {
|
| + expect(e.name, equals('file4'));
|
| + expect(e.isFile, equals(true));
|
| + }),
|
| + (e) {
|
| + fail('Got file error: ${e.code}');
|
| + });
|
| + });
|
| });
|
| }
|
|
|