| 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 "chrome/browser/chromeos/settings/session_manager_operation.h" | 5 #include "chrome/browser/chromeos/settings/session_manager_operation.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 13 #include "chrome/browser/chromeos/policy/proto/chrome_device_policy.pb.h" |
| 13 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" | 14 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" |
| 14 #include "chrome/browser/chromeos/settings/mock_owner_key_util.h" | 15 #include "chrome/browser/chromeos/settings/mock_owner_key_util.h" |
| 15 #include "chrome/browser/policy/proto/chromeos/chrome_device_policy.pb.h" | |
| 16 #include "chrome/browser/policy/proto/cloud/device_management_backend.pb.h" | |
| 17 #include "components/policy/core/common/cloud/cloud_policy_constants.h" | 16 #include "components/policy/core/common/cloud/cloud_policy_constants.h" |
| 18 #include "components/policy/core/common/cloud/cloud_policy_validator.h" | 17 #include "components/policy/core/common/cloud/cloud_policy_validator.h" |
| 19 #include "components/policy/core/common/cloud/policy_builder.h" | 18 #include "components/policy/core/common/cloud/policy_builder.h" |
| 20 #include "content/public/test/test_browser_thread.h" | 19 #include "content/public/test/test_browser_thread.h" |
| 21 #include "crypto/rsa_private_key.h" | 20 #include "crypto/rsa_private_key.h" |
| 21 #include "policy/proto/device_management_backend.pb.h" |
| 22 #include "testing/gmock/include/gmock/gmock.h" | 22 #include "testing/gmock/include/gmock/gmock.h" |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 | 24 |
| 25 namespace em = enterprise_management; | 25 namespace em = enterprise_management; |
| 26 | 26 |
| 27 using testing::Mock; | 27 using testing::Mock; |
| 28 using testing::_; | 28 using testing::_; |
| 29 | 29 |
| 30 namespace chromeos { | 30 namespace chromeos { |
| 31 | 31 |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 EXPECT_FALSE(op.policy_data()->has_request_token()); | 281 EXPECT_FALSE(op.policy_data()->has_request_token()); |
| 282 EXPECT_EQ(policy_.policy_data().username(), op.policy_data()->username()); | 282 EXPECT_EQ(policy_.policy_data().username(), op.policy_data()->username()); |
| 283 | 283 |
| 284 // Loaded device settings should match what the operation received. | 284 // Loaded device settings should match what the operation received. |
| 285 ASSERT_TRUE(op.device_settings().get()); | 285 ASSERT_TRUE(op.device_settings().get()); |
| 286 EXPECT_EQ(policy_.payload().SerializeAsString(), | 286 EXPECT_EQ(policy_.payload().SerializeAsString(), |
| 287 op.device_settings()->SerializeAsString()); | 287 op.device_settings()->SerializeAsString()); |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace chromeos | 290 } // namespace chromeos |
| OLD | NEW |