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

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

Issue 12317100: Don't use strange DNS names HTTP proxy test in Windows (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_proxy_test.dart
diff --git a/tests/standalone/io/http_proxy_test.dart b/tests/standalone/io/http_proxy_test.dart
index 24a2f84176fdc50c3cc7c90cb874448faa8f88a0..af8cdff4882b8fe658f1ecb1416feb2718a2f160 100644
--- a/tests/standalone/io/http_proxy_test.dart
+++ b/tests/standalone/io/http_proxy_test.dart
@@ -189,15 +189,26 @@ void testProxy() {
setupServer(1, directRequestPaths: ["/4"], secure: true).then((secureServer) {
HttpClient client = new HttpClient();
- List<String> proxy =
- ["PROXY localhost:${proxyServer.port}",
- "PROXY localhost:${proxyServer.port}; PROXY hede.hule.hest:8080",
- "PROXY hede.hule.hest:8080; PROXY localhost:${proxyServer.port}",
- "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181;"
- " PROXY localhost:${proxyServer.port}",
- "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181; DIRECT",
- "PROXY localhost:${proxyServer.port}; DIRECT"];
-
+ List<String> proxy;
+ if (Platform.operatingSystem == "windows") {
+ proxy =
+ ["PROXY localhost:${proxyServer.port}",
+ "PROXY localhost:${proxyServer.port}; PROXY hede.hule.hest:8080",
Anders Johnsen 2013/02/25 16:26:26 I still see a weird name here.
Søren Gjesse 2013/02/25 16:28:57 It should (hopefully) never get to that as the se
+ "PROXY localhost:${proxyServer.port}",
+ ""
+ " PROXY localhost:${proxyServer.port}",
+ "DIRECT",
+ "PROXY localhost:${proxyServer.port}; DIRECT"];
+ } else {
+ proxy =
+ ["PROXY localhost:${proxyServer.port}",
+ "PROXY localhost:${proxyServer.port}; PROXY hede.hule.hest:8080",
+ "PROXY hede.hule.hest:8080; PROXY localhost:${proxyServer.port}",
+ "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181;"
+ " PROXY localhost:${proxyServer.port}",
+ "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181; DIRECT",
+ "PROXY localhost:${proxyServer.port}; DIRECT"];
+ }
client.findProxy = (Uri uri) {
// Pick the proxy configuration based on the request path.
int index = int.parse(uri.path.substring(1));
@@ -248,13 +259,25 @@ void testProxyChain() {
setupServer(2, directRequestPaths: ["/4"]).then((server) {
HttpClient client = new HttpClient();
- List<String> proxy =
- ["PROXY localhost:${proxyServer1.port}",
- "PROXY localhost:${proxyServer1.port}; PROXY hede.hule.hest:8080",
- "PROXY hede.hule.hest:8080; PROXY localhost:${proxyServer1.port}",
- "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181; PROXY localhost:${proxyServer1.port}",
- "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181; DIRECT",
- "PROXY localhost:${proxyServer1.port}; DIRECT"];
+ List<String> proxy;
+ if (Platform.operatingSystem == "windows") {
+ proxy =
+ ["PROXY localhost:${proxyServer1.port}",
+ "PROXY localhost:${proxyServer1.port}; PROXY hede.hule.hest:8080",
Anders Johnsen 2013/02/25 16:26:26 Ditto.
Søren Gjesse 2013/02/25 16:28:57 Ditto.
+ "PROXY localhost:${proxyServer1.port}",
+ "PROXY localhost:${proxyServer1.port}",
+ "DIRECT",
+ "PROXY localhost:${proxyServer1.port}; DIRECT"];
+ } else {
+ proxy =
+ ["PROXY localhost:${proxyServer1.port}",
+ "PROXY localhost:${proxyServer1.port}; PROXY hede.hule.hest:8080",
+ "PROXY hede.hule.hest:8080; PROXY localhost:${proxyServer1.port}",
+ "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181;"
+ " PROXY localhost:${proxyServer1.port}",
+ "PROXY hede.hule.hest:8080; PROXY hede.hule.hest:8181; DIRECT",
+ "PROXY localhost:${proxyServer1.port}; DIRECT"];
+ }
client.findProxy = (Uri uri) {
// Pick the proxy configuration based on the request path.
« 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