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

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: add copyright to echo_wsh.py (copied from PRESUBMIT.py) Created 8 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 | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/data/http/tests/websocket/tests/echo_wsh.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 58f585dc9fb105b12a78a9b21a8084b74ed3e464..901e539a26a1a5d03a4e9aca991b034c393625c7 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -768,7 +768,9 @@ void TimedMessageLoopRunner::QuitAfter(int ms) {
}
TestWebSocketServer::TestWebSocketServer()
- : started_(false), port_(kDefaultWsPort) {
+ : started_(false),
+ port_(kDefaultWsPort),
+ secure_(false) {
#if defined(OS_POSIX)
process_group_id_ = base::kNullProcessHandle;
#endif
@@ -779,6 +781,10 @@ int TestWebSocketServer::UseRandomPort() {
return port_;
}
+void TestWebSocketServer::UseTLS() {
+ secure_ = true;
+}
+
bool TestWebSocketServer::Start(const FilePath& root_directory) {
if (started_)
return true;
@@ -790,6 +796,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;
« no previous file with comments | « chrome/test/base/ui_test_utils.h ('k') | chrome/test/data/http/tests/websocket/tests/echo_wsh.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698