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

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

Issue 12330133: Don't use external servers in the tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed long lines 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
Index: tests/standalone/io/https_client_socket_reuse_test.dart
diff --git a/tests/standalone/io/https_client_socket_reuse_test.dart b/tests/standalone/io/https_client_socket_reuse_test.dart
deleted file mode 100644
index 5b4244b29b90e90012f1678df80cca8b83e759cc..0000000000000000000000000000000000000000
--- a/tests/standalone/io/https_client_socket_reuse_test.dart
+++ /dev/null
@@ -1,43 +0,0 @@
-// Copyright (c) 2012, 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:async";
-import "dart:io";
-import "dart:uri";
-import "dart:isolate";
-
-// By running tests sequentially, we cover the socket reuse code in HttpClient.
-
-void testGoogleUrls() {
- int testsStarted = 0;
- int testsFinished = 0;
- bool allStarted = false;
- HttpClient client = new HttpClient();
-
- Future testUrl(String url) {
- testsStarted++;
- var requestUri = Uri.parse(url);
- return client.getUrl(requestUri)
- .then((HttpClientRequest request) => request.close())
- .then((HttpClientResponse response) {
- Expect.isTrue(response.statusCode < 500);
- if (requestUri.path.length == 0) {
- Expect.isTrue(response.statusCode != 404);
- }
- return response.reduce(null, (previous, element) => null);
- })
- .catchError((error) => Expect.fail("Unexpected IO error: $error"));
- }
-
- // TODO(3593): Use a Dart HTTPS server for this test.
- testUrl('https://www.google.dk')
- .then((_) => testUrl('https://www.google.dk'))
- .then((_) => testUrl('https://www.google.dk/#q=foo'))
- .then((_) => testUrl('https://www.google.dk/#hl=da&q=foo'))
- .then((_) { client.close(); });
-}
-
-void main() {
- testGoogleUrls();
-}

Powered by Google App Engine
This is Rietveld 408576698