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

Side by Side Diff: chrome/browser/policy/device_management_service_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 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "base/message_loop.h" 6 #include "base/message_loop.h"
7 #include "base/stl_util.h" 7 #include "base/stl_util.h"
8 #include "chrome/browser/policy/cloud_policy_constants.h" 8 #include "chrome/browser/policy/cloud_policy_constants.h"
9 #include "chrome/browser/policy/device_management_service.h" 9 #include "chrome/browser/policy/device_management_service.h"
10 #include "chrome/test/base/in_process_browser_test.h" 10 #include "chrome/test/base/in_process_browser_test.h"
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 service_.reset(); 170 service_.reset();
171 test_server_.reset(); 171 test_server_.reset();
172 interceptor_.reset(); 172 interceptor_.reset();
173 } 173 }
174 174
175 void StartTestServer() { 175 void StartTestServer() {
176 test_server_.reset( 176 test_server_.reset(
177 new net::TestServer( 177 new net::TestServer(
178 net::TestServer::TYPE_HTTP, 178 net::TestServer::TYPE_HTTP,
179 net::TestServer::kLocalhost, 179 net::TestServer::kLocalhost,
180 base::FilePath(FILE_PATH_LITERAL("chrome/test/data/policy")))); 180 net::TestServer::GetSourceRelativePath(
181 base::FilePath(FILE_PATH_LITERAL("chrome/test/data/policy")))));
181 ASSERT_TRUE(test_server_->Start()); 182 ASSERT_TRUE(test_server_->Start());
182 } 183 }
183 184
184 void RecordToken(DeviceManagementStatus status, 185 void RecordToken(DeviceManagementStatus status,
185 const em::DeviceManagementResponse& response) { 186 const em::DeviceManagementResponse& response) {
186 token_ = response.register_response().device_management_token(); 187 token_ = response.register_response().device_management_token();
187 } 188 }
188 189
189 std::string token_; 190 std::string token_;
190 scoped_ptr<DeviceManagementService> service_; 191 scoped_ptr<DeviceManagementService> service_;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 MessageLoop::current()->Run(); 244 MessageLoop::current()->Run();
244 } 245 }
245 246
246 INSTANTIATE_TEST_CASE_P( 247 INSTANTIATE_TEST_CASE_P(
247 DeviceManagementServiceIntegrationTestInstance, 248 DeviceManagementServiceIntegrationTestInstance,
248 DeviceManagementServiceIntegrationTest, 249 DeviceManagementServiceIntegrationTest,
249 testing::Values(&DeviceManagementServiceIntegrationTest::InitCannedResponse, 250 testing::Values(&DeviceManagementServiceIntegrationTest::InitCannedResponse,
250 &DeviceManagementServiceIntegrationTest::InitTestServer)); 251 &DeviceManagementServiceIntegrationTest::InitTestServer));
251 252
252 } // namespace policy 253 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698