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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "components/policy/core/common/policy_provider_android.h" | 6 #include "components/policy/core/common/policy_provider_android.h" |
7 #include "components/policy/core/common/policy_provider_android_delegate.h" | 7 #include "components/policy/core/common/policy_provider_android_delegate.h" |
8 #include "testing/gmock/include/gmock/gmock.h" | 8 #include "testing/gmock/include/gmock/gmock.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroidTestFixture); | 55 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroidTestFixture); |
56 }; | 56 }; |
57 | 57 |
58 } // namespace | 58 } // namespace |
59 | 59 |
60 class PolicyProviderAndroidTest : public ::testing::Test { | 60 class PolicyProviderAndroidTest : public ::testing::Test { |
61 protected: | 61 protected: |
62 PolicyProviderAndroidTest(); | 62 PolicyProviderAndroidTest(); |
63 virtual ~PolicyProviderAndroidTest(); | 63 virtual ~PolicyProviderAndroidTest(); |
64 | 64 |
65 virtual void SetUp() OVERRIDE; | 65 virtual void SetUp() override; |
66 virtual void TearDown() OVERRIDE; | 66 virtual void TearDown() override; |
67 | 67 |
68 private: | 68 private: |
69 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroidTest); | 69 DISALLOW_COPY_AND_ASSIGN(PolicyProviderAndroidTest); |
70 }; | 70 }; |
71 | 71 |
72 PolicyProviderAndroidTest::PolicyProviderAndroidTest() {} | 72 PolicyProviderAndroidTest::PolicyProviderAndroidTest() {} |
73 PolicyProviderAndroidTest::~PolicyProviderAndroidTest() {} | 73 PolicyProviderAndroidTest::~PolicyProviderAndroidTest() {} |
74 | 74 |
75 void PolicyProviderAndroidTest::SetUp() {} | 75 void PolicyProviderAndroidTest::SetUp() {} |
76 | 76 |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 policy_bundle.reset(new PolicyBundle); | 119 policy_bundle.reset(new PolicyBundle); |
120 SetPolicy(policy_bundle.get(), "key", "new_value"); | 120 SetPolicy(policy_bundle.get(), "key", "new_value"); |
121 expected_policy_bundle.CopyFrom(*policy_bundle); | 121 expected_policy_bundle.CopyFrom(*policy_bundle); |
122 provider.Get()->SetPolicies(policy_bundle.Pass()); | 122 provider.Get()->SetPolicies(policy_bundle.Pass()); |
123 EXPECT_TRUE(provider.Get()->policies().Equals(expected_policy_bundle)); | 123 EXPECT_TRUE(provider.Get()->policies().Equals(expected_policy_bundle)); |
124 | 124 |
125 EXPECT_CALL(delegate, PolicyProviderShutdown()).Times(1); | 125 EXPECT_CALL(delegate, PolicyProviderShutdown()).Times(1); |
126 } | 126 } |
127 | 127 |
128 } // namespace policy | 128 } // namespace policy |
OLD | NEW |