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

Side by Side Diff: base/prefs/overlay_user_pref_store_unittest.cc

Issue 804533005: Standardize usage of virtual/override/final specifiers in base/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Simplify Created 6 years 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
« no previous file with comments | « base/prefs/json_pref_store_unittest.cc ('k') | base/prefs/pref_change_registrar_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/prefs/overlay_user_pref_store.h" 5 #include "base/prefs/overlay_user_pref_store.h"
6 6
7 #include "base/prefs/pref_store_observer_mock.h" 7 #include "base/prefs/pref_store_observer_mock.h"
8 #include "base/prefs/testing_pref_store.h" 8 #include "base/prefs/testing_pref_store.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 19 matching lines...) Expand all
30 30
31 class OverlayUserPrefStoreTest : public testing::Test { 31 class OverlayUserPrefStoreTest : public testing::Test {
32 protected: 32 protected:
33 OverlayUserPrefStoreTest() 33 OverlayUserPrefStoreTest()
34 : underlay_(new TestingPrefStore()), 34 : underlay_(new TestingPrefStore()),
35 overlay_(new OverlayUserPrefStore(underlay_.get())) { 35 overlay_(new OverlayUserPrefStore(underlay_.get())) {
36 overlay_->RegisterOverlayPref(overlay_key); 36 overlay_->RegisterOverlayPref(overlay_key);
37 overlay_->RegisterOverlayPref(mapped_overlay_key, mapped_underlay_key); 37 overlay_->RegisterOverlayPref(mapped_overlay_key, mapped_underlay_key);
38 } 38 }
39 39
40 virtual ~OverlayUserPrefStoreTest() {} 40 ~OverlayUserPrefStoreTest() override {}
41 41
42 scoped_refptr<TestingPrefStore> underlay_; 42 scoped_refptr<TestingPrefStore> underlay_;
43 scoped_refptr<OverlayUserPrefStore> overlay_; 43 scoped_refptr<OverlayUserPrefStore> overlay_;
44 }; 44 };
45 45
46 TEST_F(OverlayUserPrefStoreTest, Observer) { 46 TEST_F(OverlayUserPrefStoreTest, Observer) {
47 PrefStoreObserverMock obs; 47 PrefStoreObserverMock obs;
48 overlay_->AddObserver(&obs); 48 overlay_->AddObserver(&obs);
49 49
50 // Check that underlay first value is reported. 50 // Check that underlay first value is reported.
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 245
246 overlay_->RemoveObserver(&obs); 246 overlay_->RemoveObserver(&obs);
247 247
248 // Check successful unsubscription. 248 // Check successful unsubscription.
249 underlay_->SetValue(mapped_underlay_key, new FundamentalValue(47)); 249 underlay_->SetValue(mapped_underlay_key, new FundamentalValue(47));
250 overlay_->SetValue(mapped_overlay_key, new FundamentalValue(48)); 250 overlay_->SetValue(mapped_overlay_key, new FundamentalValue(48));
251 EXPECT_TRUE(obs.changed_keys.empty()); 251 EXPECT_TRUE(obs.changed_keys.empty());
252 } 252 }
253 253
254 } // namespace base 254 } // namespace base
OLDNEW
« no previous file with comments | « base/prefs/json_pref_store_unittest.cc ('k') | base/prefs/pref_change_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698