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

Side by Side Diff: components/invalidation/impl/invalidator_storage_unittest.cc

Issue 2562733003: Remove duplicated user_prefs::TestingPrefServiceSyncable (Closed)
Patch Set: Fixed usage from .mm files Created 4 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
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 "components/invalidation/impl/invalidator_storage.h" 5 #include "components/invalidation/impl/invalidator_storage.h"
6 6
7 #include "base/strings/string_util.h" 7 #include "base/strings/string_util.h"
8 #include "components/invalidation/impl/unacked_invalidation_set_test_util.h" 8 #include "components/invalidation/impl/unacked_invalidation_set_test_util.h"
9 #include "components/pref_registry/testing_pref_service_syncable.h"
10 #include "components/prefs/pref_service.h" 9 #include "components/prefs/pref_service.h"
10 #include "components/sync_preferences/testing_pref_service_syncable.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace invalidation { 13 namespace invalidation {
14 14
15 class InvalidatorStorageTest : public testing::Test { 15 class InvalidatorStorageTest : public testing::Test {
16 public: 16 public:
17 InvalidatorStorageTest() {} 17 InvalidatorStorageTest() {}
18 18
19 void SetUp() override { 19 void SetUp() override {
20 InvalidatorStorage::RegisterProfilePrefs(pref_service_.registry()); 20 InvalidatorStorage::RegisterProfilePrefs(pref_service_.registry());
21 } 21 }
22 22
23 protected: 23 protected:
24 user_prefs::TestingPrefServiceSyncable pref_service_; 24 sync_preferences::TestingPrefServiceSyncable pref_service_;
25 }; 25 };
26 26
27 // Clearing the storage should erase all version map entries, bootstrap data, 27 // Clearing the storage should erase all version map entries, bootstrap data,
28 // and the client ID. 28 // and the client ID.
29 TEST_F(InvalidatorStorageTest, Clear) { 29 TEST_F(InvalidatorStorageTest, Clear) {
30 InvalidatorStorage storage(&pref_service_); 30 InvalidatorStorage storage(&pref_service_);
31 EXPECT_TRUE(storage.GetBootstrapData().empty()); 31 EXPECT_TRUE(storage.GetBootstrapData().empty());
32 EXPECT_TRUE(storage.GetInvalidatorClientId().empty()); 32 EXPECT_TRUE(storage.GetInvalidatorClientId().empty());
33 33
34 storage.ClearAndSetNewClientId("fake_id"); 34 storage.ClearAndSetNewClientId("fake_id");
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 map.insert(std::make_pair(storage2.object_id(), storage2)); 94 map.insert(std::make_pair(storage2.object_id(), storage2));
95 95
96 storage.SetSavedInvalidations(map); 96 storage.SetSavedInvalidations(map);
97 syncer::UnackedInvalidationsMap restored_map = 97 syncer::UnackedInvalidationsMap restored_map =
98 storage.GetSavedInvalidations(); 98 storage.GetSavedInvalidations();
99 99
100 EXPECT_THAT(map, syncer::test_util::Eq(restored_map)); 100 EXPECT_THAT(map, syncer::test_util::Eq(restored_map));
101 } 101 }
102 102
103 } // namespace invalidation 103 } // namespace invalidation
OLDNEW
« no previous file with comments | « components/invalidation/impl/DEPS ('k') | components/invalidation/impl/ticl_profile_settings_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698