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

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

Issue 12340103: Issue 5071 is now fixed (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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/io/http_request_pipeling_test.dart
diff --git a/tests/standalone/io/http_request_pipeling_test.dart b/tests/standalone/io/http_request_pipeling_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..4e99c278032c2e37d844d89f270813e9fded45bd
--- /dev/null
+++ b/tests/standalone/io/http_request_pipeling_test.dart
@@ -0,0 +1,32 @@
+// 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.
+
+import "dart:io";
+import "dart:uri";
+
+void main() {
+ final int REQUEST_COUNT = 100;
+ int count = 0;
+ HttpServer.bind().then((server) {
+ server.listen((HttpRequest request) {
+ count++;
+ request.response.addString(request.uri.path);
+ request.response.close();
+ if (request.uri.path == "/done") {
+ request.response.done.then((_) {
+ Expect.equals(REQUEST_COUNT + 1, count);
+ server.close();
+ });
+ }
+ });
+ Socket.connect("127.0.0.1", server.port).then((s) {
+ s.listen((data) { });
+ for (int i = 0; i < REQUEST_COUNT; i++) {
+ s.addString("GET /$i HTTP/1.1\r\nX-Header-1: 111\r\n\r\n");
+ }
+ s.addString("GET /done HTTP/1.1\r\nConnection: close\r\n\r\n");
+ s.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