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 <set> | 5 #include <set> |
6 #include <string> | 6 #include <string> |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/prefs/testing_pref_store.h" | |
10 #include "base/values.h" | 9 #include "base/values.h" |
11 #include "chrome/browser/supervised_user/supervised_user_constants.h" | 10 #include "chrome/browser/supervised_user/supervised_user_constants.h" |
12 #include "chrome/browser/supervised_user/supervised_user_pref_store.h" | 11 #include "chrome/browser/supervised_user/supervised_user_pref_store.h" |
13 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" | 12 #include "chrome/browser/supervised_user/supervised_user_settings_service.h" |
14 #include "chrome/common/pref_names.h" | 13 #include "chrome/common/pref_names.h" |
| 14 #include "components/prefs/testing_pref_store.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 | 16 |
17 using base::DictionaryValue; | 17 using base::DictionaryValue; |
18 using base::Value; | 18 using base::Value; |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 class SupervisedUserPrefStoreFixture : public PrefStore::Observer { | 22 class SupervisedUserPrefStoreFixture : public PrefStore::Observer { |
23 public: | 23 public: |
24 explicit SupervisedUserPrefStoreFixture( | 24 explicit SupervisedUserPrefStoreFixture( |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 TEST_F(SupervisedUserPrefStoreTest, CreatePrefStoreAfterInitialization) { | 172 TEST_F(SupervisedUserPrefStoreTest, CreatePrefStoreAfterInitialization) { |
173 pref_store_->SetInitializationCompleted(); | 173 pref_store_->SetInitializationCompleted(); |
174 service_.SetActive(true); | 174 service_.SetActive(true); |
175 | 175 |
176 SupervisedUserPrefStoreFixture fixture(&service_); | 176 SupervisedUserPrefStoreFixture fixture(&service_); |
177 EXPECT_TRUE(fixture.initialization_completed()); | 177 EXPECT_TRUE(fixture.initialization_completed()); |
178 EXPECT_EQ(0u, fixture.changed_prefs()->size()); | 178 EXPECT_EQ(0u, fixture.changed_prefs()->size()); |
179 } | 179 } |
180 | 180 |
OLD | NEW |