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

Unified Diff: tests/html/fileapi_test.dart

Issue 12474007: Revert 20127 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/notifications_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/fileapi_test.dart
diff --git a/tests/html/fileapi_test.dart b/tests/html/fileapi_test.dart
index 2acca99ed05bfd7bc3544318ceac9a0feb2886d4..681750cffb1a990433c8439181135d10851f3f7d 100644
--- a/tests/html/fileapi_test.dart
+++ b/tests/html/fileapi_test.dart
@@ -43,15 +43,17 @@ main() {
test('directoryDoesntExist', () {
return fs.root.getDirectory(
- 'directory2')
+ 'directory2',
+ options: {})
.catchError((e) {
expect(e.error.code, equals(FileError.NOT_FOUND_ERR));
}, test: (e) => e is FileError);
});
test('directoryCreate', () {
- return fs.root.createDirectory(
- 'directory3')
+ return fs.root.getDirectory(
+ 'directory3',
+ options: {'create': true})
.then((DirectoryEntry e) {
expect(e.name, equals('directory3'));
});
@@ -65,15 +67,17 @@ main() {
test('fileDoesntExist', () {
return fs.root.getFile(
- 'file2')
+ 'file2',
+ options: {})
.catchError((e) {
expect(e.error.code, equals(FileError.NOT_FOUND_ERR));
}, test: (e) => e is FileError);
});
test('fileCreate', () {
- return fs.root.createFile(
- 'file4')
+ return fs.root.getFile(
+ 'file4',
+ options: {'create': true})
.then((FileEntry e) {
expect(e.name, equals('file4'));
expect(e.isFile, isTrue);
@@ -93,11 +97,13 @@ main() {
// Do the boilerplate to get several files and directories created to then
// test the functions that use those items.
Future doDirSetup() {
- return fs.root.createFile(
- 'file4')
+ return fs.root.getFile(
+ 'file4',
+ options: {'create': true})
.then((FileEntry file) {
- return fs.root.createDirectory(
- 'directory3')
+ return fs.root.getDirectory(
+ 'directory3',
+ options: {'create': true})
.then((DirectoryEntry dir) {
return new Future.immediate(new FileAndDir(file, dir));
});
@@ -151,7 +157,7 @@ main() {
}).then((entry) {
expect(entry.name, 'movedFile');
expect(entry.fullPath, '/directory3/movedFile');
- return fs.root.getFile('file4');
+ return fs.root.getFile('file4', options: {'create': false});
}).catchError((e) {
expect(e.error.code, equals(FileError.NOT_FOUND_ERR));
}, test: (e) => e is FileError);
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | tests/html/notifications_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698