Index: tests/html/xhr_test.dart |
diff --git a/tests/html/xhr_test.dart b/tests/html/xhr_test.dart |
index 6214581348fa2f52c81539eae33689163c6e5af5..0087b74a392b8f8f68c8bd5b3aae09583c92712e 100644 |
--- a/tests/html/xhr_test.dart |
+++ b/tests/html/xhr_test.dart |
@@ -86,8 +86,8 @@ main() { |
test('XHR.request No file', () { |
HttpRequest.request('NonExistingFile').then( |
(_) { fail('Request should not have succeeded.'); }, |
- onError: expectAsync1((e) { |
- var xhr = e.error.target; |
+ onError: expectAsync1((error) { |
+ var xhr = error.target; |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
validate404(xhr); |
})); |
@@ -116,8 +116,8 @@ main() { |
test('XHR.request withCredentials No file', () { |
HttpRequest.request('NonExistingFile', withCredentials: true).then( |
(_) { fail('Request should not have succeeded.'); }, |
- onError: expectAsync1((e) { |
- var xhr = e.error.target; |
+ onError: expectAsync1((error) { |
+ var xhr = error.target; |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
validate404(xhr); |
})); |
@@ -137,8 +137,8 @@ main() { |
test('XHR.getString No file', () { |
HttpRequest.getString('NonExistingFile').then( |
(_) { fail('Succeeded for non-existing file.'); }, |
- onError: expectAsync1((e) { |
- validate404(e.error.target); |
+ onError: expectAsync1((error) { |
+ validate404(error.target); |
})); |
}); |