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

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

Issue 11428022: Fix badly written test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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/io/http_content_length_test.dart
diff --git a/tests/standalone/io/http_content_length_test.dart b/tests/standalone/io/http_content_length_test.dart
index 47ef94166916fcfcc8ce7d344f40c9c0db054aab..5a082f2a9f191abcac70c2f30c4f57ac230c9568 100644
--- a/tests/standalone/io/http_content_length_test.dart
+++ b/tests/standalone/io/http_content_length_test.dart
@@ -37,10 +37,9 @@ void testNoBody(int totalConnections, bool explicitContentLength) {
conn.onResponse = (HttpClientResponse response) {
Expect.equals("0", response.headers.value('content-length'));
Expect.equals(0, response.contentLength);
- count++;
response.inputStream.onData = response.inputStream.read;
response.inputStream.onClosed = () {
- if (count == totalConnections) {
+ if (++count == totalConnections) {
client.shutdown();
server.close();
}
@@ -84,10 +83,9 @@ void testBody(int totalConnections) {
conn.onResponse = (HttpClientResponse response) {
Expect.equals("2", response.headers.value('content-length'));
Expect.equals(2, response.contentLength);
- count++;
response.inputStream.onData = response.inputStream.read;
response.inputStream.onClosed = () {
- if (count == totalConnections) {
+ if (++count == totalConnections) {
client.shutdown();
server.close();
}
« 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