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

Unified Diff: chrome/test/base/ui_test_utils.cc

Issue 9959062: browser_tests to access wss:// after proceeds anyway (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment update Created 8 years, 9 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: chrome/test/base/ui_test_utils.cc
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index 26e8df978f519465c6b91430d6980834e43a28b2..b18897e8d72b46a8ea1c13ac209b44ba78c2f6f8 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -767,7 +767,7 @@ void TimedMessageLoopRunner::QuitAfter(int ms) {
}
TestWebSocketServer::TestWebSocketServer()
- : started_(false), port_(kDefaultWsPort) {
+ : started_(false), port_(kDefaultWsPort), secure_(false) {
sky 2012/04/02 15:37:37 nit: because this isn't all on one line, each para
Takashi Toyoshima 2012/04/04 09:01:07 Done.
#if defined(OS_POSIX)
process_group_id_ = base::kNullProcessHandle;
#endif
@@ -778,6 +778,10 @@ int TestWebSocketServer::UseRandomPort() {
return port_;
}
+void TestWebSocketServer::UseTLS() {
+ secure_ = true;
+}
+
bool TestWebSocketServer::Start(const FilePath& root_directory) {
if (started_)
return true;
@@ -789,6 +793,8 @@ bool TestWebSocketServer::Start(const FilePath& root_directory) {
cmd_line->AppendArgNative(FILE_PATH_LITERAL("--root=") +
root_directory.value());
cmd_line->AppendArg("--port=" + base::IntToString(port_));
+ if (secure_)
+ cmd_line->AppendArg("--tls");
if (!temp_dir_.CreateUniqueTempDir()) {
LOG(ERROR) << "Unable to create a temporary directory.";
return false;

Powered by Google App Engine
This is Rietveld 408576698