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 031ea05f0e2b70cb7029183db94d376eb4402b1f..569728f6fa61bb4b7969c9ede8d38459af48812a 100644 |
--- a/chrome/test/base/ui_test_utils.cc |
+++ b/chrome/test/base/ui_test_utils.cc |
@@ -877,7 +877,8 @@ void MessageLoopRunner::Quit() { |
TestWebSocketServer::TestWebSocketServer() |
: started_(false), |
port_(kDefaultWsPort), |
- secure_(false) { |
+ secure_(false), |
+ client_authentication_(false) { |
#if defined(OS_POSIX) |
process_group_id_ = base::kNullProcessHandle; |
#endif |
@@ -892,6 +893,11 @@ void TestWebSocketServer::UseTLS() { |
secure_ = true; |
} |
+void TestWebSocketServer::UseClientAuthentication() { |
+ secure_ = true; |
wtc
2012/07/11 21:35:57
Nit: this method probably should not set secure_ t
Takashi Toyoshima
2012/07/12 05:20:13
Done.
|
+ client_authentication_ = true; |
+} |
+ |
bool TestWebSocketServer::Start(const FilePath& root_directory) { |
if (started_) |
return true; |
@@ -909,6 +915,13 @@ bool TestWebSocketServer::Start(const FilePath& root_directory) { |
LOG(ERROR) << "Unable to create a temporary directory."; |
return false; |
} |
+ FilePath cacert_path(root_directory); |
wtc
2012/07/11 21:35:57
The declaration of the cacert_path variable can be
Takashi Toyoshima
2012/07/12 05:20:13
Done.
|
+ if (client_authentication_) { |
+ cmd_line->AppendArg("--ca-certificate"); |
wtc
2012/07/11 21:35:57
It is strange that the --ca-certificate option alo
Takashi Toyoshima
2012/07/12 05:20:13
Currently, just adding '--ca-certificate <filename
wtc
2012/07/12 23:10:48
Thank you for the info. I suggest that you use tw
|
+ cacert_path = cacert_path.Append(FILE_PATH_LITERAL("ssl")); |
+ cacert_path = cacert_path.Append(FILE_PATH_LITERAL("cacert.pem")); |
+ cmd_line->AppendArgNative(cacert_path.value()); |
+ } |
cmd_line->AppendArgNative(FILE_PATH_LITERAL("--output-dir=") + |
temp_dir_.path().value()); |
websocket_pid_file_ = temp_dir_.path().AppendASCII("websocket.pid"); |