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

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

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/pref_notifier_impl_unittest.cc ('k') | base/prefs/pref_store_observer_mock.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 <string> 5 #include <string>
6 6
7 #include "base/prefs/json_pref_store.h" 7 #include "base/prefs/json_pref_store.h"
8 #include "base/prefs/mock_pref_change_callback.h" 8 #include "base/prefs/mock_pref_change_callback.h"
9 #include "base/prefs/pref_change_registrar.h" 9 #include "base/prefs/pref_change_registrar.h"
10 #include "base/prefs/pref_registry_simple.h" 10 #include "base/prefs/pref_registry_simple.h"
11 #include "base/prefs/pref_service_factory.h" 11 #include "base/prefs/pref_service_factory.h"
12 #include "base/prefs/pref_value_store.h" 12 #include "base/prefs/pref_value_store.h"
13 #include "base/prefs/testing_pref_service.h" 13 #include "base/prefs/testing_pref_service.h"
14 #include "base/prefs/testing_pref_store.h" 14 #include "base/prefs/testing_pref_store.h"
15 #include "base/values.h" 15 #include "base/values.h"
16 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gtest/googlemock/include/gmock/gmock.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/googletest/include/gtest/gtest.h"
18 18
19 using testing::_; 19 using testing::_;
20 using testing::Mock; 20 using testing::Mock;
21 21
22 const char kPrefName[] = "pref.name"; 22 const char kPrefName[] = "pref.name";
23 23
24 TEST(PrefServiceTest, NoObserverFire) { 24 TEST(PrefServiceTest, NoObserverFire) {
25 TestingPrefServiceSimple prefs; 25 TestingPrefServiceSimple prefs;
26 26
27 const char pref_name[] = "homepage"; 27 const char pref_name[] = "homepage";
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 417
418 EXPECT_CALL(observer_, OnPreferenceChanged(_)).Times(0); 418 EXPECT_CALL(observer_, OnPreferenceChanged(_)).Times(0);
419 prefs_.Set(kName, new_value); 419 prefs_.Set(kName, new_value);
420 Mock::VerifyAndClearExpectations(&observer_); 420 Mock::VerifyAndClearExpectations(&observer_);
421 421
422 base::ListValue empty; 422 base::ListValue empty;
423 observer_.Expect(kName, &empty); 423 observer_.Expect(kName, &empty);
424 prefs_.Set(kName, empty); 424 prefs_.Set(kName, empty);
425 Mock::VerifyAndClearExpectations(&observer_); 425 Mock::VerifyAndClearExpectations(&observer_);
426 } 426 }
OLDNEW
« no previous file with comments | « base/prefs/pref_notifier_impl_unittest.cc ('k') | base/prefs/pref_store_observer_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698