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

Unified Diff: tests/html/fileapi_test.dart

Issue 11184007: Support new named arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 side-by-side diff with in-line comments
Download patch
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}');
+ });
+ });
});
}

Powered by Google App Engine
This is Rietveld 408576698