Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store_unittest.cc

Issue 6894020: Adds async interface method to PersistentPrefStore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 2010->2011 Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/proxy_config_dictionary.h" 9 #include "chrome/browser/prefs/proxy_config_dictionary.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 provider_.RemovePolicy(kPolicyHomepageLocation); 812 provider_.RemovePolicy(kPolicyHomepageLocation);
813 store_->OnUpdatePolicy(); 813 store_->OnUpdatePolicy();
814 Mock::VerifyAndClearExpectations(&observer_); 814 Mock::VerifyAndClearExpectations(&observer_);
815 EXPECT_EQ(PrefStore::READ_NO_VALUE, 815 EXPECT_EQ(PrefStore::READ_NO_VALUE,
816 store_->GetValue(prefs::kHomePage, NULL)); 816 store_->GetValue(prefs::kHomePage, NULL));
817 } 817 }
818 818
819 TEST_F(ConfigurationPolicyPrefStoreRefreshTest, Initialization) { 819 TEST_F(ConfigurationPolicyPrefStoreRefreshTest, Initialization) {
820 EXPECT_FALSE(store_->IsInitializationComplete()); 820 EXPECT_FALSE(store_->IsInitializationComplete());
821 821
822 EXPECT_CALL(observer_, OnInitializationCompleted()).Times(1); 822 EXPECT_CALL(observer_, OnInitializationCompleted(true)).Times(1);
823 823
824 provider_.SetInitializationComplete(true); 824 provider_.SetInitializationComplete(true);
825 EXPECT_FALSE(store_->IsInitializationComplete()); 825 EXPECT_FALSE(store_->IsInitializationComplete());
826 826
827 store_->OnUpdatePolicy(); 827 store_->OnUpdatePolicy();
828 Mock::VerifyAndClearExpectations(&observer_); 828 Mock::VerifyAndClearExpectations(&observer_);
829 EXPECT_TRUE(store_->IsInitializationComplete()); 829 EXPECT_TRUE(store_->IsInitializationComplete());
830 } 830 }
831 831
832 } // namespace policy 832 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_pref_store.cc ('k') | chrome/browser/prefs/overlay_persistent_pref_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698