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

Side by Side Diff: chrome/test/nacl/nacl_browsertest_util.cc

Issue 12210088: Make the TestServer use an absolute document root path. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: testserver uses absolute docroot path Created 7 years, 10 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698