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

Unified Diff: tests/standalone/io/http_auth_test.dart

Issue 13860006: Fix static type errors in a number of tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « tests/standalone/io/file_test.dart ('k') | tests/standalone/io/raw_secure_server_socket_argument_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_auth_test.dart
diff --git a/tests/standalone/io/http_auth_test.dart b/tests/standalone/io/http_auth_test.dart
index ef400f44f4b03e0ae571d06e30355b755d477eac..8871d4034f4e922a538f88163ad57a9b2fb42884 100644
--- a/tests/standalone/io/http_auth_test.dart
+++ b/tests/standalone/io/http_auth_test.dart
@@ -223,15 +223,15 @@ void testLocalServerBasic() {
return new Future.value(true);
};
- HttpClientConnection conn =
- client.getUrl(Uri.parse("http://127.0.0.1/basic/test"));
- conn.onResponse = (HttpClientResponse response) {
- Expect.equals(HttpStatus.OK, response.statusCode);
- response.inputStream.onData = () => response.inputStream.read();
- response.inputStream.onClosed = () {
- client.shutdown();
- };
- };
+ client.getUrl(Uri.parse("http://127.0.0.1/basic/test"))
+ .then((HttpClientRequest request) => request.close())
+ .then((HttpClientResponse response) {
+ Expect.equals(HttpStatus.OK, response.statusCode);
+ response.fold(null, (x, y) {})
+ .then((_) {
+ client.close();
+ });
+ });
}
void testLocalServerDigest() {
@@ -246,15 +246,15 @@ void testLocalServerDigest() {
return new Future.value(true);
};
- HttpClientConnection conn =
- client.getUrl(Uri.parse("http://127.0.0.1/digest/test"));
- conn.onResponse = (HttpClientResponse response) {
- Expect.equals(HttpStatus.OK, response.statusCode);
- response.inputStream.onData = () => response.inputStream.read();
- response.inputStream.onClosed = () {
- client.shutdown();
- };
- };
+ client.getUrl(Uri.parse("http://127.0.0.1/digest/test"))
+ .then((HttpClientRequest request) => request.close())
+ .then((HttpClientResponse response) {
+ Expect.equals(HttpStatus.OK, response.statusCode);
+ response.fold(null, (x, y) {})
+ .then((_) {
+ client.close();
+ });
+ });
}
main() {
« no previous file with comments | « tests/standalone/io/file_test.dart ('k') | tests/standalone/io/raw_secure_server_socket_argument_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698