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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/bind_helpers.h" | 6 #include "base/bind_helpers.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 base::Unretained(this))); | 136 base::Unretained(this))); |
137 base::MessageLoop::current()->Run(); | 137 base::MessageLoop::current()->Run(); |
138 } | 138 } |
139 | 139 |
140 virtual void SetUpOnMainThread() OVERRIDE { | 140 virtual void SetUpOnMainThread() OVERRIDE { |
141 std::string service_url((this->*(GetParam()))()); | 141 std::string service_url((this->*(GetParam()))()); |
142 service_.reset(new DeviceManagementService( | 142 service_.reset(new DeviceManagementService( |
143 g_browser_process->system_request_context(), | 143 g_browser_process->system_request_context(), |
144 service_url, | 144 service_url, |
145 "UserAgent", | 145 "UserAgent", |
146 "UserAgentParam", | 146 "UserAgentParam")); |
147 "PlatformParam")); | |
148 service_->ScheduleInitialization(0); | 147 service_->ScheduleInitialization(0); |
149 } | 148 } |
150 | 149 |
151 virtual void CleanUpOnMainThread() OVERRIDE { | 150 virtual void CleanUpOnMainThread() OVERRIDE { |
152 service_.reset(); | 151 service_.reset(); |
153 test_server_.reset(); | 152 test_server_.reset(); |
154 interceptor_.reset(); | 153 interceptor_.reset(); |
155 } | 154 } |
156 | 155 |
157 void StartTestServer() { | 156 void StartTestServer() { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 base::MessageLoop::current()->Run(); | 254 base::MessageLoop::current()->Run(); |
256 } | 255 } |
257 | 256 |
258 INSTANTIATE_TEST_CASE_P( | 257 INSTANTIATE_TEST_CASE_P( |
259 DeviceManagementServiceIntegrationTestInstance, | 258 DeviceManagementServiceIntegrationTestInstance, |
260 DeviceManagementServiceIntegrationTest, | 259 DeviceManagementServiceIntegrationTest, |
261 testing::Values(&DeviceManagementServiceIntegrationTest::InitCannedResponse, | 260 testing::Values(&DeviceManagementServiceIntegrationTest::InitCannedResponse, |
262 &DeviceManagementServiceIntegrationTest::InitTestServer)); | 261 &DeviceManagementServiceIntegrationTest::InitTestServer)); |
263 | 262 |
264 } // namespace policy | 263 } // namespace policy |
OLD | NEW |