OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/file_path.h" | 5 #include "base/file_path.h" |
6 #include "base/memory/ref_counted.h" | 6 #include "base/memory/ref_counted.h" |
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 7 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | 8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" |
9 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 9 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" | 10 #include "chrome/browser/prefs/proxy_config_dictionary.h" |
11 #include "chrome/common/pref_names.h" | 11 #include "chrome/common/pref_names.h" |
12 #include "chrome/common/pref_store_observer_mock.h" | 12 #include "chrome/common/pref_store_observer_mock.h" |
13 #include "content/common/notification_service.h" | |
14 #include "testing/gmock/include/gmock/gmock.h" | 13 #include "testing/gmock/include/gmock/gmock.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
16 | 15 |
17 using testing::_; | 16 using testing::_; |
18 using testing::Mock; | 17 using testing::Mock; |
19 | 18 |
20 namespace policy { | 19 namespace policy { |
21 | 20 |
22 // Holds a set of test parameters, consisting of pref name and policy type. | 21 // Holds a set of test parameters, consisting of pref name and policy type. |
23 class TypeAndName { | 22 class TypeAndName { |
(...skipping 952 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
976 | 975 |
977 provider_.SetInitializationComplete(true); | 976 provider_.SetInitializationComplete(true); |
978 EXPECT_FALSE(store_->IsInitializationComplete()); | 977 EXPECT_FALSE(store_->IsInitializationComplete()); |
979 | 978 |
980 store_->OnUpdatePolicy(); | 979 store_->OnUpdatePolicy(); |
981 Mock::VerifyAndClearExpectations(&observer_); | 980 Mock::VerifyAndClearExpectations(&observer_); |
982 EXPECT_TRUE(store_->IsInitializationComplete()); | 981 EXPECT_TRUE(store_->IsInitializationComplete()); |
983 } | 982 } |
984 | 983 |
985 } // namespace policy | 984 } // namespace policy |
OLD | NEW |