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

Side by Side Diff: chrome/browser/ui/app_list/search/suggestions/suggestions_search_provider_unittest.cc

Issue 2459823002: [Sync] Rename syncable_prefs to sync_preferences. (Closed)
Patch Set: Created 4 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 | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/app_list/speech_auth_helper_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 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 "chrome/browser/ui/app_list/search/suggestions/suggestions_search_provi der.h" 5 #include "chrome/browser/ui/app_list/search/suggestions/suggestions_search_provi der.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <memory> 10 #include <memory>
11 #include <string> 11 #include <string>
12 #include <vector> 12 #include <vector>
13 13
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "base/strings/utf_string_conversions.h" 15 #include "base/strings/utf_string_conversions.h"
16 #include "chrome/browser/sync/profile_sync_test_util.h" 16 #include "chrome/browser/sync/profile_sync_test_util.h"
17 #include "chrome/browser/ui/app_list/app_list_test_util.h" 17 #include "chrome/browser/ui/app_list/app_list_test_util.h"
18 #include "chrome/test/base/testing_profile.h" 18 #include "chrome/test/base/testing_profile.h"
19 #include "components/suggestions/proto/suggestions.pb.h" 19 #include "components/suggestions/proto/suggestions.pb.h"
20 #include "components/suggestions/suggestions_store.h" 20 #include "components/suggestions/suggestions_store.h"
21 #include "components/syncable_prefs/testing_pref_service_syncable.h" 21 #include "components/sync_preferences/testing_pref_service_syncable.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 #include "ui/app_list/search_result.h" 23 #include "ui/app_list/search_result.h"
24 24
25 using suggestions::ChromeSuggestion; 25 using suggestions::ChromeSuggestion;
26 using suggestions::SuggestionsProfile; 26 using suggestions::SuggestionsProfile;
27 using suggestions::SuggestionsStore; 27 using suggestions::SuggestionsStore;
28 28
29 namespace app_list { 29 namespace app_list {
30 namespace test { 30 namespace test {
31 31
(...skipping 22 matching lines...) Expand all
54 ~SuggestionsSearchProviderTest() override {} 54 ~SuggestionsSearchProviderTest() override {}
55 55
56 // AppListTestBase overrides: 56 // AppListTestBase overrides:
57 void SetUp() override { 57 void SetUp() override {
58 AppListTestBase::SetUp(); 58 AppListTestBase::SetUp();
59 59
60 profile_ = MakeSignedInTestingProfile(); 60 profile_ = MakeSignedInTestingProfile();
61 suggestions_search_.reset( 61 suggestions_search_.reset(
62 new SuggestionsSearchProvider(profile_.get(), NULL)); 62 new SuggestionsSearchProvider(profile_.get(), NULL));
63 63
64 syncable_prefs::TestingPrefServiceSyncable* pref_service = 64 sync_preferences::TestingPrefServiceSyncable* pref_service =
65 profile_->GetTestingPrefService(); 65 profile_->GetTestingPrefService();
66 suggestions_store_.reset(new SuggestionsStore(pref_service)); 66 suggestions_store_.reset(new SuggestionsStore(pref_service));
67 } 67 }
68 68
69 void TearDown() override { 69 void TearDown() override {
70 // Making sure suggestions are cleared between tests. 70 // Making sure suggestions are cleared between tests.
71 suggestions_store_->ClearSuggestions(); 71 suggestions_store_->ClearSuggestions();
72 profile_.reset(); 72 profile_.reset();
73 } 73 }
74 74
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 // those suggestions, with "foo" being more relevant since it came first in 131 // those suggestions, with "foo" being more relevant since it came first in
132 // the suggestions profile. 132 // the suggestions profile.
133 EXPECT_EQ("foo,bar", RunQuery("")); 133 EXPECT_EQ("foo,bar", RunQuery(""));
134 134
135 // Non-empty query returns nothing. 135 // Non-empty query returns nothing.
136 EXPECT_EQ("", RunQuery("t")); 136 EXPECT_EQ("", RunQuery("t"));
137 } 137 }
138 138
139 } // namespace test 139 } // namespace test
140 } // namespace app_list 140 } // namespace app_list
OLDNEW
« no previous file with comments | « chrome/browser/ui/BUILD.gn ('k') | chrome/browser/ui/app_list/speech_auth_helper_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698