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

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

Issue 14251006: Remove AsyncError with Expando. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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/http_content_length_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/http_10_test.dart
diff --git a/tests/standalone/io/http_10_test.dart b/tests/standalone/io/http_10_test.dart
index 0c79981dd9f233a0947ccba031a237311f4bd7e2..81b60286eab14dfa6db55521ab309d792ef634bb 100644
--- a/tests/standalone/io/http_10_test.dart
+++ b/tests/standalone/io/http_10_test.dart
@@ -25,14 +25,19 @@ void testHttp10NoKeepAlive() {
Expect.equals("1.0", request.protocolVersion);
response.done
.then((_) => Expect.fail("Unexpected response completion"))
- .catchError((e) => Expect.isTrue(e.error is HttpException));
+ .catchError((error) => Expect.isTrue(error is HttpException));
response.write("Z");
response.write("Z");
response.close();
Expect.throws(() => response.write("x"),
(e) => e is StateError);
},
- onError: (e) => Expect.fail("Unexpected error $e"));
+ onError: (e) {
+ String msg = "Unexpected error $e";
+ var trace = getAttachedStackTrace(e);
+ if (trace != null) msg += "\nStackTrace: $trace";
+ Expect.fail(msg);
+ });
int count = 0;
makeRequest() {
@@ -77,7 +82,12 @@ void testHttp10ServerClose() {
response.close();
});
},
- onError: (e) => Expect.fail("Unexpected error $e"));
+ onError: (e) {
+ String msg = "Unexpected error $e";
+ var trace = getAttachedStackTrace(e);
+ if (trace != null) msg += "\nStackTrace: $trace";
+ Expect.fail(msg);
+ });
int count = 0;
makeRequest() {
@@ -124,7 +134,12 @@ void testHttp10KeepAlive() {
response.write("Z");
response.close();
},
- onError: (e) => Expect.fail("Unexpected error $e"));
+ onError: (e) {
+ String msg = "Unexpected error $e";
+ var trace = getAttachedStackTrace(e);
+ if (trace != null) msg += "\nStackTrace: $trace";
+ Expect.fail(msg);
+ });
Socket.connect("127.0.0.1", server.port).then((socket) {
void sendRequest() {
@@ -174,7 +189,12 @@ void testHttp10KeepAliveServerCloses() {
response.write("Z");
response.close();
},
- onError: (e) => Expect.fail("Unexpected error $e"));
+ onError: (e) {
+ String msg = "Unexpected error $e";
+ var trace = getAttachedStackTrace(e);
+ if (trace != null) msg += "\nStackTrace: $trace";
+ Expect.fail(msg);
+ });
int count = 0;
makeRequest() {
« no previous file with comments | « tests/standalone/io/file_test.dart ('k') | tests/standalone/io/http_content_length_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698