| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 PowerPolicyBrowserTestBase::PowerPolicyBrowserTestBase() | 180 PowerPolicyBrowserTestBase::PowerPolicyBrowserTestBase() |
| 181 : power_manager_client_(NULL) { | 181 : power_manager_client_(NULL) { |
| 182 } | 182 } |
| 183 | 183 |
| 184 void PowerPolicyBrowserTestBase::SetUpInProcessBrowserTestFixture() { | 184 void PowerPolicyBrowserTestBase::SetUpInProcessBrowserTestFixture() { |
| 185 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); | 185 DevicePolicyCrosBrowserTest::SetUpInProcessBrowserTestFixture(); |
| 186 power_manager_client_ = new chromeos::FakePowerManagerClient; | 186 power_manager_client_ = new chromeos::FakePowerManagerClient; |
| 187 dbus_setter()->SetPowerManagerClient( | 187 dbus_setter()->SetPowerManagerClient( |
| 188 scoped_ptr<chromeos::PowerManagerClient>(power_manager_client_)); | 188 std::unique_ptr<chromeos::PowerManagerClient>(power_manager_client_)); |
| 189 | 189 |
| 190 // Initialize device policy. | 190 // Initialize device policy. |
| 191 InstallOwnerKey(); | 191 InstallOwnerKey(); |
| 192 MarkAsEnterpriseOwned(); | 192 MarkAsEnterpriseOwned(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 void PowerPolicyBrowserTestBase::SetUpOnMainThread() { | 195 void PowerPolicyBrowserTestBase::SetUpOnMainThread() { |
| 196 DevicePolicyCrosBrowserTest::SetUpOnMainThread(); | 196 DevicePolicyCrosBrowserTest::SetUpOnMainThread(); |
| 197 | 197 |
| 198 // Initialize user policy. | 198 // Initialize user policy. |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 policy = baseline_policy; | 512 policy = baseline_policy; |
| 513 policy.set_ac_idle_action(power_manager_client_->policy().ac_idle_action()); | 513 policy.set_ac_idle_action(power_manager_client_->policy().ac_idle_action()); |
| 514 policy.set_battery_idle_action( | 514 policy.set_battery_idle_action( |
| 515 power_manager_client_->policy().battery_idle_action()); | 515 power_manager_client_->policy().battery_idle_action()); |
| 516 policy.set_reason(power_manager_client_->policy().reason()); | 516 policy.set_reason(power_manager_client_->policy().reason()); |
| 517 EXPECT_EQ(GetDebugString(policy), | 517 EXPECT_EQ(GetDebugString(policy), |
| 518 GetDebugString(power_manager_client_->policy())); | 518 GetDebugString(power_manager_client_->policy())); |
| 519 } | 519 } |
| 520 | 520 |
| 521 } // namespace policy | 521 } // namespace policy |
| OLD | NEW |