| 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 30 matching lines...) Expand all Loading... |
| 41 #include "chromeos/dbus/fake_session_manager_client.h" | 41 #include "chromeos/dbus/fake_session_manager_client.h" |
| 42 #include "chromeos/dbus/power_manager/policy.pb.h" | 42 #include "chromeos/dbus/power_manager/policy.pb.h" |
| 43 #include "chromeos/dbus/power_policy_controller.h" | 43 #include "chromeos/dbus/power_policy_controller.h" |
| 44 #include "chromeos/login/user_names.h" | 44 #include "chromeos/login/user_names.h" |
| 45 #include "components/policy/core/common/cloud/cloud_policy_core.h" | 45 #include "components/policy/core/common/cloud/cloud_policy_core.h" |
| 46 #include "components/policy/core/common/cloud/cloud_policy_store.h" | 46 #include "components/policy/core/common/cloud/cloud_policy_store.h" |
| 47 #include "components/policy/core/common/cloud/policy_builder.h" | 47 #include "components/policy/core/common/cloud/policy_builder.h" |
| 48 #include "components/policy/core/common/external_data_fetcher.h" | 48 #include "components/policy/core/common/external_data_fetcher.h" |
| 49 #include "components/policy/core/common/mock_policy_service.h" | 49 #include "components/policy/core/common/mock_policy_service.h" |
| 50 #include "components/policy/core/common/policy_service.h" | 50 #include "components/policy/core/common/policy_service.h" |
| 51 #include "components/policy/proto/device_management_backend.pb.h" |
| 51 #include "components/signin/core/account_id/account_id.h" | 52 #include "components/signin/core/account_id/account_id.h" |
| 52 #include "content/public/browser/notification_details.h" | 53 #include "content/public/browser/notification_details.h" |
| 53 #include "content/public/browser/notification_service.h" | 54 #include "content/public/browser/notification_service.h" |
| 54 #include "content/public/browser/notification_source.h" | 55 #include "content/public/browser/notification_source.h" |
| 55 #include "content/public/test/test_utils.h" | 56 #include "content/public/test/test_utils.h" |
| 56 #include "extensions/browser/api/power/power_api.h" | 57 #include "extensions/browser/api/power/power_api.h" |
| 57 #include "extensions/common/api/power.h" | 58 #include "extensions/common/api/power.h" |
| 58 #include "policy/proto/device_management_backend.pb.h" | |
| 59 #include "testing/gmock/include/gmock/gmock.h" | 59 #include "testing/gmock/include/gmock/gmock.h" |
| 60 #include "testing/gtest/include/gtest/gtest.h" | 60 #include "testing/gtest/include/gtest/gtest.h" |
| 61 | 61 |
| 62 namespace em = enterprise_management; | 62 namespace em = enterprise_management; |
| 63 namespace pm = power_manager; | 63 namespace pm = power_manager; |
| 64 | 64 |
| 65 using ::testing::AnyNumber; | 65 using ::testing::AnyNumber; |
| 66 using ::testing::InvokeWithoutArgs; | 66 using ::testing::InvokeWithoutArgs; |
| 67 using ::testing::_; | 67 using ::testing::_; |
| 68 | 68 |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 policy = baseline_policy; | 514 policy = baseline_policy; |
| 515 policy.set_ac_idle_action(power_manager_client_->policy().ac_idle_action()); | 515 policy.set_ac_idle_action(power_manager_client_->policy().ac_idle_action()); |
| 516 policy.set_battery_idle_action( | 516 policy.set_battery_idle_action( |
| 517 power_manager_client_->policy().battery_idle_action()); | 517 power_manager_client_->policy().battery_idle_action()); |
| 518 policy.set_reason(power_manager_client_->policy().reason()); | 518 policy.set_reason(power_manager_client_->policy().reason()); |
| 519 EXPECT_EQ(GetDebugString(policy), | 519 EXPECT_EQ(GetDebugString(policy), |
| 520 GetDebugString(power_manager_client_->policy())); | 520 GetDebugString(power_manager_client_->policy())); |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace policy | 523 } // namespace policy |
| OLD | NEW |