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

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

Issue 1841653003: Drop |languages| from {Format,Elide}Url* and IDNToUnicode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix typo in elide_url.cc Created 4 years, 8 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 179
180 class FakeAutocompleteProviderClient 180 class FakeAutocompleteProviderClient
181 : public testing::NiceMock<MockAutocompleteProviderClient> { 181 : public testing::NiceMock<MockAutocompleteProviderClient> {
182 public: 182 public:
183 FakeAutocompleteProviderClient() 183 FakeAutocompleteProviderClient()
184 : db_thread_("Test DB thread"), pool_owner_(3, "Background Pool") { 184 : db_thread_("Test DB thread"), pool_owner_(3, "Background Pool") {
185 set_template_url_service( 185 set_template_url_service(
186 make_scoped_ptr(new TemplateURLService(nullptr, 0))); 186 make_scoped_ptr(new TemplateURLService(nullptr, 0)));
187 if (history_dir_.CreateUniqueTempDir()) { 187 if (history_dir_.CreateUniqueTempDir()) {
188 history_service_ = history::CreateHistoryService(history_dir_.path(), 188 history_service_ = history::CreateHistoryService(history_dir_.path(),
189 std::string(), true); 189 true);
190 } 190 }
191 191
192 db_thread_.Start(); 192 db_thread_.Start();
193 shortcuts_backend_ = new ShortcutsBackend( 193 shortcuts_backend_ = new ShortcutsBackend(
194 GetTemplateURLService(), make_scoped_ptr(new SearchTermsData()), 194 GetTemplateURLService(), make_scoped_ptr(new SearchTermsData()),
195 history_service_.get(), db_thread_.task_runner(), base::FilePath(), 195 history_service_.get(), db_thread_.task_runner(), base::FilePath(),
196 true); 196 true);
197 shortcuts_backend_->Init(); 197 shortcuts_backend_->Init();
198 } 198 }
199 199
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 743 }
744 744
745 TEST_F(ShortcutsProviderTest, DoesNotProvideOnFocus) { 745 TEST_F(ShortcutsProviderTest, DoesNotProvideOnFocus) {
746 AutocompleteInput input(ASCIIToUTF16("about:o"), base::string16::npos, 746 AutocompleteInput input(ASCIIToUTF16("about:o"), base::string16::npos,
747 std::string(), GURL(), 747 std::string(), GURL(),
748 metrics::OmniboxEventProto::INVALID_SPEC, false, 748 metrics::OmniboxEventProto::INVALID_SPEC, false,
749 false, true, true, true, TestSchemeClassifier()); 749 false, true, true, true, TestSchemeClassifier());
750 provider_->Start(input, false); 750 provider_->Start(input, false);
751 EXPECT_TRUE(provider_->matches().empty()); 751 EXPECT_TRUE(provider_->matches().empty());
752 } 752 }
OLDNEW
« no previous file with comments | « components/omnibox/browser/shortcuts_provider.cc ('k') | components/omnibox/browser/url_index_private_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698