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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 } | 69 } |
70 | 70 |
71 } // namespace | 71 } // namespace |
72 | 72 |
73 class DeviceCloudPolicyInvalidatorTest : public testing::Test { | 73 class DeviceCloudPolicyInvalidatorTest : public testing::Test { |
74 public: | 74 public: |
75 DeviceCloudPolicyInvalidatorTest(); | 75 DeviceCloudPolicyInvalidatorTest(); |
76 virtual ~DeviceCloudPolicyInvalidatorTest(); | 76 virtual ~DeviceCloudPolicyInvalidatorTest(); |
77 | 77 |
78 // testing::Test: | 78 // testing::Test: |
79 virtual void SetUp() OVERRIDE; | 79 virtual void SetUp() override; |
80 virtual void TearDown() OVERRIDE; | 80 virtual void TearDown() override; |
81 | 81 |
82 // Ownership is not passed. The Profile is owned by the global ProfileManager. | 82 // Ownership is not passed. The Profile is owned by the global ProfileManager. |
83 Profile *LogInAndReturnProfile(const std::string& user_id); | 83 Profile *LogInAndReturnProfile(const std::string& user_id); |
84 | 84 |
85 invalidation::TiclInvalidationService* GetDeviceInvalidationService(); | 85 invalidation::TiclInvalidationService* GetDeviceInvalidationService(); |
86 bool HasDeviceInvalidationServiceObserver() const; | 86 bool HasDeviceInvalidationServiceObserver() const; |
87 | 87 |
88 invalidation::FakeInvalidationService* GetProfileInvalidationService( | 88 invalidation::FakeInvalidationService* GetProfileInvalidationService( |
89 Profile* profile); | 89 Profile* profile); |
90 int GetProfileInvalidationServiceObserverCount() const; | 90 int GetProfileInvalidationServiceObserverCount() const; |
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
737 invalidator = GetCloudPolicyInvalidator(); | 737 invalidator = GetCloudPolicyInvalidator(); |
738 ASSERT_TRUE(invalidator); | 738 ASSERT_TRUE(invalidator); |
739 EXPECT_EQ(profile_2_invalidation_service, GetInvalidationService()); | 739 EXPECT_EQ(profile_2_invalidation_service, GetInvalidationService()); |
740 | 740 |
741 // Verify that the invalidator's highest handled invalidation version starts | 741 // Verify that the invalidator's highest handled invalidation version starts |
742 // out as one. | 742 // out as one. |
743 EXPECT_EQ(1, invalidator->highest_handled_invalidation_version()); | 743 EXPECT_EQ(1, invalidator->highest_handled_invalidation_version()); |
744 } | 744 } |
745 | 745 |
746 } // namespace policy | 746 } // namespace policy |
OLD | NEW |