| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/test/ppapi/ppapi_test.h" | 5 #include "chrome/test/ppapi/ppapi_test.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 void PPAPITestBase::RunTestViaHTTP(const std::string& test_case) { | 167 void PPAPITestBase::RunTestViaHTTP(const std::string& test_case) { |
| 168 FilePath document_root; | 168 FilePath document_root; |
| 169 ASSERT_TRUE(ui_test_utils::GetRelativeBuildDirectory(&document_root)); | 169 ASSERT_TRUE(ui_test_utils::GetRelativeBuildDirectory(&document_root)); |
| 170 RunHTTPTestServer(document_root, test_case, ""); | 170 RunHTTPTestServer(document_root, test_case, ""); |
| 171 } | 171 } |
| 172 | 172 |
| 173 void PPAPITestBase::RunTestWithSSLServer(const std::string& test_case) { | 173 void PPAPITestBase::RunTestWithSSLServer(const std::string& test_case) { |
| 174 FilePath document_root; | 174 FilePath document_root; |
| 175 ASSERT_TRUE(ui_test_utils::GetRelativeBuildDirectory(&document_root)); | 175 ASSERT_TRUE(ui_test_utils::GetRelativeBuildDirectory(&document_root)); |
| 176 net::TestServer test_server(net::BaseTestServer::HTTPSOptions(), | 176 net::TestServer test_server(net::TestServer::TYPE_HTTPS, |
| 177 net::BaseTestServer::SSLOptions(), |
| 177 document_root); | 178 document_root); |
| 178 ASSERT_TRUE(test_server.Start()); | 179 ASSERT_TRUE(test_server.Start()); |
| 179 uint16_t port = test_server.host_port_pair().port(); | 180 uint16_t port = test_server.host_port_pair().port(); |
| 180 RunHTTPTestServer(document_root, test_case, | 181 RunHTTPTestServer(document_root, test_case, |
| 181 StringPrintf("ssl_server_port=%d", port)); | 182 StringPrintf("ssl_server_port=%d", port)); |
| 182 } | 183 } |
| 183 | 184 |
| 184 void PPAPITestBase::RunTestWithWebSocketServer(const std::string& test_case) { | 185 void PPAPITestBase::RunTestWithWebSocketServer(const std::string& test_case) { |
| 185 FilePath websocket_root_dir; | 186 FilePath websocket_root_dir; |
| 186 ASSERT_TRUE( | 187 ASSERT_TRUE( |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 } | 332 } |
| 332 | 333 |
| 333 // Append the correct mode and testcase string | 334 // Append the correct mode and testcase string |
| 334 std::string PPAPINaClTestDisallowedSockets::BuildQuery( | 335 std::string PPAPINaClTestDisallowedSockets::BuildQuery( |
| 335 const std::string& base, | 336 const std::string& base, |
| 336 const std::string& test_case) { | 337 const std::string& test_case) { |
| 337 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), | 338 return StringPrintf("%smode=nacl_newlib&testcase=%s", base.c_str(), |
| 338 test_case.c_str()); | 339 test_case.c_str()); |
| 339 } | 340 } |
| 340 | 341 |
| OLD | NEW |