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

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

Issue 14771007: Always connect using HOST_NAME, but swicth on host source on secure upgrade, in secure_upgrade test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/io/secure_socket.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/socket_upgrade_to_secure_test.dart
diff --git a/tests/standalone/io/socket_upgrade_to_secure_test.dart b/tests/standalone/io/socket_upgrade_to_secure_test.dart
index c10163a6f03692ee6246a590aaddf36c6938067c..4cf55c83f50c307684c258778b40635a7b7ff38c 100644
--- a/tests/standalone/io/socket_upgrade_to_secure_test.dart
+++ b/tests/standalone/io/socket_upgrade_to_secure_test.dart
@@ -12,7 +12,6 @@ import "dart:async";
import "dart:io";
import "dart:isolate";
-const HOST_IP = "127.0.0.1";
const HOST_NAME = "localhost";
const CERTIFICATE = "localhost_cert";
@@ -152,9 +151,8 @@ void test(bool hostnameInConnect,
}
Future<SecureSocket> connectClient(int port) {
- var host = hostnameInConnect ? HOST_NAME : HOST_IP;
if (!handshakeBeforeSecure) {
- return Socket.connect(host, port).then((socket) {
+ return Socket.connect(HOST_NAME, port).then((socket) {
var future;
if (hostnameInConnect) {
future = SecureSocket.secure(socket);
@@ -167,7 +165,7 @@ void test(bool hostnameInConnect,
});
});
} else {
- return Socket.connect(host, port).then((socket) {
+ return Socket.connect(HOST_NAME, port).then((socket) {
return runClientHandshake(socket).then((_) {
var future;
if (hostnameInConnect) {
« no previous file with comments | « sdk/lib/io/secure_socket.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698