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/policy/user_cloud_policy_manager.h" | 5 #include "chrome/browser/policy/user_cloud_policy_manager.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 10 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
11 #include "chrome/browser/policy/mock_user_cloud_policy_store.h" | 11 #include "chrome/browser/policy/mock_user_cloud_policy_store.h" |
| 12 #include "chrome/browser/policy/policy_namespace.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
14 | 15 |
15 namespace em = enterprise_management; | 16 namespace em = enterprise_management; |
16 | 17 |
17 using testing::AnyNumber; | 18 using testing::AnyNumber; |
18 using testing::AtLeast; | 19 using testing::AtLeast; |
19 using testing::Mock; | 20 using testing::Mock; |
20 using testing::_; | 21 using testing::_; |
21 | 22 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 store_->NotifyStoreLoaded(); | 79 store_->NotifyStoreLoaded(); |
79 EXPECT_TRUE(expected_bundle_.Equals(manager_->policies())); | 80 EXPECT_TRUE(expected_bundle_.Equals(manager_->policies())); |
80 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); | 81 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); |
81 EXPECT_CALL(*store_, Clear()); | 82 EXPECT_CALL(*store_, Clear()); |
82 manager_->DisconnectAndRemovePolicy(); | 83 manager_->DisconnectAndRemovePolicy(); |
83 EXPECT_FALSE(manager_->core()->service()); | 84 EXPECT_FALSE(manager_->core()->service()); |
84 } | 85 } |
85 | 86 |
86 } // namespace | 87 } // namespace |
87 } // namespace policy | 88 } // namespace policy |
OLD | NEW |