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

Unified Diff: tests/standalone/src/io/HttpServerEarlyClientCloseTest.dart

Issue 10073006: Update test to hopefully help detect flanky results on Windows. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/src/io/HttpServerEarlyClientCloseTest.dart
diff --git a/tests/standalone/src/io/HttpServerEarlyClientCloseTest.dart b/tests/standalone/src/io/HttpServerEarlyClientCloseTest.dart
index 439a22530d90fbea31b5a3707a0e71589e49c040..320ed1e431a705019334b90b99d8ef6a1de6c673 100644
--- a/tests/standalone/src/io/HttpServerEarlyClientCloseTest.dart
+++ b/tests/standalone/src/io/HttpServerEarlyClientCloseTest.dart
@@ -23,15 +23,19 @@ class EarlyCloseTest {
Completer c = new Completer();
bool calledOnRequest = false;
+ bool calledOnError = false;
server.onRequest = (HttpRequest request, HttpResponse response) {
Expect.isTrue(expectRequest);
+ Expect.isFalse(calledOnError);
Expect.isFalse(calledOnRequest, "onRequest called multiple times");
calledOnRequest = true;
};
ReceivePort port = new ReceivePort();
server.onError = (Exception error) {
+ Expect.isFalse(calledOnError);
Expect.equals(exception, error.message);
- calledOnRequest = true; // onRequest is not allowed after onError.
+ Expect.equals(expectRequest, calledOnRequest);
+ calledOnError = true;
port.close();
c.complete(null);
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698