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 "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 Loading... |
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 Loading... |
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 |
OLD | NEW |