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

Side by Side Diff: chrome/browser/extensions/extension_apitest.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/browser/extensions/extension_apitest.h" 5 #include "chrome/browser/extensions/extension_apitest.h"
6 6
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "base/stringprintf.h" 8 #include "base/stringprintf.h"
9 #include "chrome/browser/extensions/api/test/test_api.h" 9 #include "chrome/browser/extensions/api/test/test_api.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 test_server()->host_port_pair().port()); 292 test_server()->host_port_pair().port());
293 293
294 return true; 294 return true;
295 } 295 }
296 296
297 bool ExtensionApiTest::StartWebSocketServer( 297 bool ExtensionApiTest::StartWebSocketServer(
298 const base::FilePath& root_directory) { 298 const base::FilePath& root_directory) {
299 websocket_server_.reset(new net::TestServer( 299 websocket_server_.reset(new net::TestServer(
300 net::TestServer::TYPE_WS, 300 net::TestServer::TYPE_WS,
301 net::TestServer::kLocalhost, 301 net::TestServer::kLocalhost,
302 root_directory)); 302 net::TestServer::GetSourceRelativePath(root_directory)));
303 303
304 if (!websocket_server_->Start()) 304 if (!websocket_server_->Start())
305 return false; 305 return false;
306 306
307 test_config_->SetInteger(kTestWebSocketPort, 307 test_config_->SetInteger(kTestWebSocketPort,
308 websocket_server_->host_port_pair().port()); 308 websocket_server_->host_port_pair().port());
309 309
310 return true; 310 return true;
311 } 311 }
312 312
313 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) { 313 void ExtensionApiTest::SetUpCommandLine(CommandLine* command_line) {
314 ExtensionBrowserTest::SetUpCommandLine(command_line); 314 ExtensionBrowserTest::SetUpCommandLine(command_line);
315 test_data_dir_ = test_data_dir_.AppendASCII("api_test"); 315 test_data_dir_ = test_data_dir_.AppendASCII("api_test");
316 } 316 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698