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

Side by Side Diff: components/omnibox/browser/shortcuts_provider_unittest.cc

Issue 2317123002: c/browser, c/common, components O-P: Change ScopedTempDir::path() to GetPath() (Closed)
Patch Set: Just rebased Created 4 years, 3 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
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/omnibox/browser/shortcuts_provider.h" 5 #include "components/omnibox/browser/shortcuts_provider.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 AutocompleteMatchType::HISTORY_URL, "", 1, 100 }, 179 AutocompleteMatchType::HISTORY_URL, "", 1, 100 },
180 }; 180 };
181 181
182 class FakeAutocompleteProviderClient 182 class FakeAutocompleteProviderClient
183 : public testing::NiceMock<MockAutocompleteProviderClient> { 183 : public testing::NiceMock<MockAutocompleteProviderClient> {
184 public: 184 public:
185 FakeAutocompleteProviderClient() 185 FakeAutocompleteProviderClient()
186 : db_thread_("Test DB thread"), pool_owner_(3, "Background Pool") { 186 : db_thread_("Test DB thread"), pool_owner_(3, "Background Pool") {
187 set_template_url_service(base::MakeUnique<TemplateURLService>(nullptr, 0)); 187 set_template_url_service(base::MakeUnique<TemplateURLService>(nullptr, 0));
188 if (history_dir_.CreateUniqueTempDir()) { 188 if (history_dir_.CreateUniqueTempDir()) {
189 history_service_ = history::CreateHistoryService(history_dir_.path(), 189 history_service_ =
190 true); 190 history::CreateHistoryService(history_dir_.GetPath(), true);
191 } 191 }
192 192
193 db_thread_.Start(); 193 db_thread_.Start();
194 shortcuts_backend_ = new ShortcutsBackend( 194 shortcuts_backend_ = new ShortcutsBackend(
195 GetTemplateURLService(), base::MakeUnique<SearchTermsData>(), 195 GetTemplateURLService(), base::MakeUnique<SearchTermsData>(),
196 history_service_.get(), db_thread_.task_runner(), base::FilePath(), 196 history_service_.get(), db_thread_.task_runner(), base::FilePath(),
197 true); 197 true);
198 shortcuts_backend_->Init(); 198 shortcuts_backend_->Init();
199 } 199 }
200 200
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 } 744 }
745 745
746 TEST_F(ShortcutsProviderTest, DoesNotProvideOnFocus) { 746 TEST_F(ShortcutsProviderTest, DoesNotProvideOnFocus) {
747 AutocompleteInput input(ASCIIToUTF16("about:o"), base::string16::npos, 747 AutocompleteInput input(ASCIIToUTF16("about:o"), base::string16::npos,
748 std::string(), GURL(), 748 std::string(), GURL(),
749 metrics::OmniboxEventProto::INVALID_SPEC, false, 749 metrics::OmniboxEventProto::INVALID_SPEC, false,
750 false, true, true, true, TestSchemeClassifier()); 750 false, true, true, true, TestSchemeClassifier());
751 provider_->Start(input, false); 751 provider_->Start(input, false);
752 EXPECT_TRUE(provider_->matches().empty()); 752 EXPECT_TRUE(provider_->matches().empty());
753 } 753 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/shortcuts_database_unittest.cc ('k') | components/ownership/owner_key_util_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698