| 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 <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 : ui_thread_(content::BrowserThread::UI, &message_loop_), | 45 : ui_thread_(content::BrowserThread::UI, &message_loop_), |
| 46 file_thread_(content::BrowserThread::FILE, &message_loop_), | 46 file_thread_(content::BrowserThread::FILE, &message_loop_), |
| 47 owner_key_util_(new ownership::MockOwnerKeyUtil()), | 47 owner_key_util_(new ownership::MockOwnerKeyUtil()), |
| 48 user_manager_(new user_manager::FakeUserManager()), | 48 user_manager_(new user_manager::FakeUserManager()), |
| 49 user_manager_enabler_(user_manager_), | 49 user_manager_enabler_(user_manager_), |
| 50 validated_(false) { | 50 validated_(false) { |
| 51 OwnerSettingsServiceChromeOSFactory::GetInstance() | 51 OwnerSettingsServiceChromeOSFactory::GetInstance() |
| 52 ->SetOwnerKeyUtilForTesting(owner_key_util_); | 52 ->SetOwnerKeyUtilForTesting(owner_key_util_); |
| 53 } | 53 } |
| 54 | 54 |
| 55 virtual void SetUp() override { | 55 void SetUp() override { |
| 56 policy_.payload().mutable_user_whitelist()->add_user_whitelist( | 56 policy_.payload().mutable_user_whitelist()->add_user_whitelist( |
| 57 "fake-whitelist"); | 57 "fake-whitelist"); |
| 58 policy_.Build(); | 58 policy_.Build(); |
| 59 | 59 |
| 60 profile_.reset(new TestingProfile()); | 60 profile_.reset(new TestingProfile()); |
| 61 service_ = OwnerSettingsServiceChromeOSFactory::GetForBrowserContext( | 61 service_ = OwnerSettingsServiceChromeOSFactory::GetForBrowserContext( |
| 62 profile_.get()); | 62 profile_.get()); |
| 63 } | 63 } |
| 64 | 64 |
| 65 MOCK_METHOD2(OnOperationCompleted, | 65 MOCK_METHOD2(OnOperationCompleted, |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 policy_.GetBlob()); | 218 policy_.GetBlob()); |
| 219 ASSERT_TRUE(op.policy_data().get()); | 219 ASSERT_TRUE(op.policy_data().get()); |
| 220 EXPECT_EQ(policy_.policy_data().SerializeAsString(), | 220 EXPECT_EQ(policy_.policy_data().SerializeAsString(), |
| 221 op.policy_data()->SerializeAsString()); | 221 op.policy_data()->SerializeAsString()); |
| 222 ASSERT_TRUE(op.device_settings().get()); | 222 ASSERT_TRUE(op.device_settings().get()); |
| 223 EXPECT_EQ(policy_.payload().SerializeAsString(), | 223 EXPECT_EQ(policy_.payload().SerializeAsString(), |
| 224 op.device_settings()->SerializeAsString()); | 224 op.device_settings()->SerializeAsString()); |
| 225 } | 225 } |
| 226 | 226 |
| 227 } // namespace chromeos | 227 } // namespace chromeos |
| OLD | NEW |