| 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/nacl/nacl_browsertest_util.h" | 5 #include "chrome/test/nacl/nacl_browsertest_util.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/json/json_reader.h" | 8 #include "base/json/json_reader.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 ASSERT_TRUE(handler.test_passed()) << "Test failed."; | 237 ASSERT_TRUE(handler.test_passed()) << "Test failed."; |
| 238 } | 238 } |
| 239 | 239 |
| 240 bool NaClBrowserTestBase::StartTestServer() { | 240 bool NaClBrowserTestBase::StartTestServer() { |
| 241 // Launch the web server. | 241 // Launch the web server. |
| 242 base::FilePath document_root; | 242 base::FilePath document_root; |
| 243 if (!GetDocumentRoot(&document_root)) | 243 if (!GetDocumentRoot(&document_root)) |
| 244 return false; | 244 return false; |
| 245 test_server_.reset(new net::TestServer(net::TestServer::TYPE_HTTP, | 245 test_server_.reset(new net::TestServer(net::TestServer::TYPE_HTTP, |
| 246 net::TestServer::kLocalhost, | 246 net::TestServer::kLocalhost, |
| 247 document_root)); | 247 net::TestServer::GetSourceRelativePath( |
| 248 document_root))); |
| 248 return test_server_->Start(); | 249 return test_server_->Start(); |
| 249 } | 250 } |
| 250 | 251 |
| 251 base::FilePath::StringType NaClBrowserTestNewlib::Variant() { | 252 base::FilePath::StringType NaClBrowserTestNewlib::Variant() { |
| 252 return FILE_PATH_LITERAL("newlib"); | 253 return FILE_PATH_LITERAL("newlib"); |
| 253 } | 254 } |
| 254 | 255 |
| 255 base::FilePath::StringType NaClBrowserTestGLibc::Variant() { | 256 base::FilePath::StringType NaClBrowserTestGLibc::Variant() { |
| 256 return FILE_PATH_LITERAL("glibc"); | 257 return FILE_PATH_LITERAL("glibc"); |
| 257 } | 258 } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 270 } | 271 } |
| 271 | 272 |
| 272 base::FilePath::StringType NaClBrowserTestStatic::Variant() { | 273 base::FilePath::StringType NaClBrowserTestStatic::Variant() { |
| 273 return FILE_PATH_LITERAL("static"); | 274 return FILE_PATH_LITERAL("static"); |
| 274 } | 275 } |
| 275 | 276 |
| 276 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { | 277 bool NaClBrowserTestStatic::GetDocumentRoot(base::FilePath* document_root) { |
| 277 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); | 278 *document_root = base::FilePath(FILE_PATH_LITERAL("chrome/test/data/nacl")); |
| 278 return true; | 279 return true; |
| 279 } | 280 } |
| OLD | NEW |