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

Unified Diff: chrome/browser/policy/cloud_policy_browsertest.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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/cloud_policy_browsertest.cc
diff --git a/chrome/browser/policy/cloud_policy_browsertest.cc b/chrome/browser/policy/cloud_policy_browsertest.cc
index 632ca1b3fcc0a62dd40bc2858d9e5aecd0b66739..9e38b1bd046028902471685521b60d19e6c94a2f 100644
--- a/chrome/browser/policy/cloud_policy_browsertest.cc
+++ b/chrome/browser/policy/cloud_policy_browsertest.cc
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/base_paths.h"
#include "base/command_line.h"
#include "base/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/memory/scoped_ptr.h"
-#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/stringprintf.h"
#include "chrome/browser/browser_process.h"
@@ -117,17 +115,14 @@ class CloudPolicyTest : public InProcessBrowserTest {
virtual ~CloudPolicyTest() {}
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
- // The TestServer wants the docroot as a path relative to the source dir.
- base::FilePath source;
- ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &source));
- ASSERT_TRUE(temp_dir_.CreateUniqueTempDirUnderPath(source));
+ ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
ASSERT_NO_FATAL_FAILURE(SetServerPolicy(GetEmptyPolicy()));
test_server_.reset(
new net::TestServer(
net::TestServer::TYPE_HTTP,
net::TestServer::kLocalhost,
- temp_dir_.path().BaseName()));
+ temp_dir_.path()));
ASSERT_TRUE(test_server_->Start());
std::string url = test_server_->GetURL("device_management").spec();

Powered by Google App Engine
This is Rietveld 408576698