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

Unified Diff: pkg/http/test/http_test.dart

Issue 11778021: Update tests for pkg/http for new library (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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 | « pkg/http/test/client_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/http/test/http_test.dart
diff --git a/pkg/http/test/http_test.dart b/pkg/http/test/http_test.dart
index 3b51e9dae5e4d7b78a70dc97648f717a33004b2a..184566cc9ac9acdc1d97bf8140c4d39d874254da 100644
--- a/pkg/http/test/http_test.dart
+++ b/pkg/http/test/http_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -164,9 +164,9 @@ main() {
});
test('read throws an error for a 4** status code', () {
- http.read(serverUrl.resolve('/error')).catchError(expectAsync1((e) {
- expect(true, e.error is HttpException);
- }));
+ http.read(serverUrl.resolve('/error'))
+ .then((_) { throw "Error expected for readBytes"; })
+ .catchError(expectAsync1((e) { }), test: (e) => e is HttpException);
});
test('readBytes', () {
@@ -187,9 +187,9 @@ main() {
});
test('readBytes throws an error for a 4** status code', () {
- http.readBytes(serverUrl.resolve('/error')).catchError(expectAsync1((e) {
- expect(true, e.error is HttpException);
- }));
+ http.readBytes(serverUrl.resolve('/error'))
+ .then((_) { throw "Error expected for readBytes"; })
+ .catchError(expectAsync1((e) { }), test: (e) => e is HttpException);
});
});
}
« no previous file with comments | « pkg/http/test/client_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698