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

Unified Diff: tests/html/fileapi_test.dart

Issue 10447126: Revert "Removed asyncTest and improved comments." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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 | « lib/unittest/unittest.dart ('k') | no next file » | 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 183906b719b5ab9567320d7103ff64e3f730695f..742bcbec3d55278ab1e37d5dc81c33097904eb69 100644
--- a/tests/html/fileapi_test.dart
+++ b/tests/html/fileapi_test.dart
@@ -7,48 +7,60 @@ main() {
useHtmlConfiguration();
window.webkitRequestFileSystem(Window.TEMPORARY, 100, (fs) {
// FIXME: add types to callback arguments after migration to wrapperless dart:html.
- test('getDirectory', () {
+ asyncTest('getDirectory', 2, () {
Expect.throws(() => fs.root.getDirectory('directory1', {'x': true}, (e) {}));
fs.root.getDirectory(
'directory2',
flags: {},
- successCallback:
- (e) => guardAsync(() => Expect.fail('Should not be reached')),
- errorCallback:
- expectAsync1((e) => Expect.equals(FileError.NOT_FOUND_ERR, e.code))
- );
+ successCallback: (e) {
+ Expect.fail('Should not be reached');
+ callbackDone();
+ },
+ errorCallback: (e) {
+ Expect.equals(FileError.NOT_FOUND_ERR, e.code);
+ callbackDone();
+ });
fs.root.getDirectory(
'directory3',
flags: {'create': true},
- successCallback:
- expectAsync1((e) => Expect.equals('directory3', e.name)),
- errorCallback:
- (e) => guardAsync(() => Expect.fail('Got file error: ${e.code}'))
- );
+ successCallback: (e) {
+ Expect.equals('directory3', e.name);
+ callbackDone();
+ },
+ errorCallback: (e) {
+ Expect.fail('Got file error: ${e.code}');
+ callbackDone();
+ });
});
- test('getFile', () {
+ asyncTest('getFile', 2, () {
Expect.throws(() => fs.root.getFile('file1', {'x': true}, (e) {}));
fs.root.getDirectory(
'file2',
flags: {},
- successCallback:
- (e) => guardAsync(() => Expect.fail('Should not be reached')),
- errorCallback:
- expectAsync1((e) => Expect.equals(FileError.NOT_FOUND_ERR, e.code))
- );
+ successCallback: (e) {
+ Expect.fail('Should not be reached');
+ callbackDone();
+ },
+ errorCallback: (e) {
+ Expect.equals(FileError.NOT_FOUND_ERR, e.code);
+ callbackDone();
+ });
fs.root.getDirectory(
'file3',
flags: {'create': true},
- successCallback:
- expectAsync1((e) => Expect.equals('file3', e.name)),
- errorCallback:
- (e) => guardAsync(() => Expect.fail('Got file error: ${e.code}'))
- );
+ successCallback: (e) {
+ Expect.equals('file3', e.name);
+ callbackDone();
+ },
+ errorCallback: (e) {
+ Expect.fail('Got file error: ${e.code}');
+ callbackDone();
+ });
});
});
}
« no previous file with comments | « lib/unittest/unittest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698