| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/policy/device_cloud_policy_invalidator.h" | 5 #include "chrome/browser/chromeos/policy/device_cloud_policy_invalidator.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "base/message_loop/message_loop_proxy.h" | 10 #include "base/message_loop/message_loop_proxy.h" |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 "user@example.com", | 113 "user@example.com", |
| 114 "device_id", | 114 "device_id", |
| 115 DEVICE_MODE_ENTERPRISE) { | 115 DEVICE_MODE_ENTERPRISE) { |
| 116 } | 116 } |
| 117 | 117 |
| 118 DeviceCloudPolicyInvalidatorTest::~DeviceCloudPolicyInvalidatorTest() { | 118 DeviceCloudPolicyInvalidatorTest::~DeviceCloudPolicyInvalidatorTest() { |
| 119 } | 119 } |
| 120 | 120 |
| 121 void DeviceCloudPolicyInvalidatorTest::SetUp() { | 121 void DeviceCloudPolicyInvalidatorTest::SetUp() { |
| 122 chromeos::SystemSaltGetter::Initialize(); | 122 chromeos::SystemSaltGetter::Initialize(); |
| 123 chromeos::DBusThreadManager::InitializeWithStub(); | 123 chromeos::DBusThreadManager::Initialize(); |
| 124 chromeos::DeviceOAuth2TokenServiceFactory::Initialize(); | 124 chromeos::DeviceOAuth2TokenServiceFactory::Initialize(); |
| 125 TestingBrowserProcess::GetGlobal()->SetSystemRequestContext( | 125 TestingBrowserProcess::GetGlobal()->SetSystemRequestContext( |
| 126 system_request_context_.get()); | 126 system_request_context_.get()); |
| 127 ASSERT_TRUE(profile_manager_.SetUp()); | 127 ASSERT_TRUE(profile_manager_.SetUp()); |
| 128 | 128 |
| 129 test_device_settings_service_.reset(new | 129 test_device_settings_service_.reset(new |
| 130 chromeos::ScopedTestDeviceSettingsService); | 130 chromeos::ScopedTestDeviceSettingsService); |
| 131 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings); | 131 test_cros_settings_.reset(new chromeos::ScopedTestCrosSettings); |
| 132 scoped_refptr<chromeos::MockOwnerKeyUtil> owner_key_util( | 132 scoped_refptr<chromeos::MockOwnerKeyUtil> owner_key_util( |
| 133 new chromeos::MockOwnerKeyUtil); | 133 new chromeos::MockOwnerKeyUtil); |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 invalidator = GetCloudPolicyInvalidator(); | 522 invalidator = GetCloudPolicyInvalidator(); |
| 523 ASSERT_TRUE(invalidator); | 523 ASSERT_TRUE(invalidator); |
| 524 EXPECT_EQ(GetDeviceInvalidationService(), GetInvalidationService()); | 524 EXPECT_EQ(GetDeviceInvalidationService(), GetInvalidationService()); |
| 525 | 525 |
| 526 // Verify that the invalidator's highest handled invalidation version starts | 526 // Verify that the invalidator's highest handled invalidation version starts |
| 527 // out as 2. | 527 // out as 2. |
| 528 EXPECT_EQ(2, invalidator->highest_handled_invalidation_version()); | 528 EXPECT_EQ(2, invalidator->highest_handled_invalidation_version()); |
| 529 } | 529 } |
| 530 | 530 |
| 531 } // namespace policy | 531 } // namespace policy |
| OLD | NEW |