Index: tests/html/xhr_test.dart |
diff --git a/tests/html/xhr_test.dart b/tests/html/xhr_test.dart |
index 78b8c5a08097af05105ad46ca558009fcf2b8c26..63c0005cfffdf2db18874c23ab9ded346335d9ea 100644 |
--- a/tests/html/xhr_test.dart |
+++ b/tests/html/xhr_test.dart |
@@ -76,7 +76,7 @@ main() { |
if (xhr.readyState == HttpRequest.DONE) { |
validate200Response(xhr); |
- Timer.run(expectAsync0(() { |
+ Timer.run(expectAsync(() { |
expect(loadEndCalled, HttpRequest.supportsLoadEndEvent); |
})); |
} |
@@ -91,7 +91,7 @@ main() { |
test('XHR.request No file', () { |
HttpRequest.request('NonExistingFile').then( |
(_) { fail('Request should not have succeeded.'); }, |
- onError: expectAsync1((error) { |
+ onError: expectAsync((error) { |
var xhr = error.target; |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
validate404(xhr); |
@@ -99,7 +99,7 @@ main() { |
}); |
test('XHR.request file', () { |
- HttpRequest.request(url).then(expectAsync1((xhr) { |
+ HttpRequest.request(url).then(expectAsync((xhr) { |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
validate200Response(xhr); |
})); |
@@ -110,7 +110,7 @@ main() { |
HttpRequest.request(url, |
onProgress: (_) { |
progressCalled = true; |
- }).then(expectAsync1( |
+ }).then(expectAsync( |
(xhr) { |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
expect(progressCalled, HttpRequest.supportsProgressEvent); |
@@ -121,7 +121,7 @@ main() { |
test('XHR.request withCredentials No file', () { |
HttpRequest.request('NonExistingFile', withCredentials: true).then( |
(_) { fail('Request should not have succeeded.'); }, |
- onError: expectAsync1((error) { |
+ onError: expectAsync((error) { |
var xhr = error.target; |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
validate404(xhr); |
@@ -129,20 +129,20 @@ main() { |
}); |
test('XHR.request withCredentials file', () { |
- HttpRequest.request(url, withCredentials: true).then(expectAsync1((xhr) { |
+ HttpRequest.request(url, withCredentials: true).then(expectAsync((xhr) { |
expect(xhr.readyState, equals(HttpRequest.DONE)); |
validate200Response(xhr); |
})); |
}); |
test('XHR.getString file', () { |
- HttpRequest.getString(url).then(expectAsync1((str) {})); |
+ HttpRequest.getString(url).then(expectAsync((str) {})); |
}); |
test('XHR.getString No file', () { |
HttpRequest.getString('NonExistingFile').then( |
(_) { fail('Succeeded for non-existing file.'); }, |
- onError: expectAsync1((error) { |
+ onError: expectAsync((error) { |
validate404(error.target); |
})); |
}); |
@@ -151,7 +151,7 @@ main() { |
if (Platform.supportsTypedData) { |
HttpRequest.request(url, responseType: 'arraybuffer', |
requestHeaders: {'Content-Type': 'text/xml'}).then( |
- expectAsync1((xhr) { |
+ expectAsync((xhr) { |
expect(xhr.status, equals(200)); |
var byteBuffer = xhr.response; |
expect(byteBuffer, new isInstanceOf<ByteBuffer>()); |
@@ -239,7 +239,7 @@ main() { |
method: 'POST', |
sendData: JSON.encode(data), |
responseType: 'json').then( |
- expectAsync1((xhr) { |
+ expectAsync((xhr) { |
expect(xhr.status, equals(200)); |
var json = xhr.response; |
expect(json, equals(data)); |