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

Side by Side Diff: chrome/browser/autocomplete/history_quick_provider_unittest.cc

Issue 343523003: Remove AutocompleteInput Type and PageClassification. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 6 years, 6 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 | Annotate | Revision Log
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 "chrome/browser/autocomplete/history_quick_provider.h" 5 #include "chrome/browser/autocomplete/history_quick_provider.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <functional> 8 #include <functional>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 void HistoryQuickProviderTest::RunTest(const base::string16 text, 256 void HistoryQuickProviderTest::RunTest(const base::string16 text,
257 bool prevent_inline_autocomplete, 257 bool prevent_inline_autocomplete,
258 std::vector<std::string> expected_urls, 258 std::vector<std::string> expected_urls,
259 bool can_inline_top_result, 259 bool can_inline_top_result,
260 base::string16 expected_fill_into_edit, 260 base::string16 expected_fill_into_edit,
261 base::string16 expected_autocompletion) { 261 base::string16 expected_autocompletion) {
262 SCOPED_TRACE(text); // Minimal hint to query being run. 262 SCOPED_TRACE(text); // Minimal hint to query being run.
263 base::MessageLoop::current()->RunUntilIdle(); 263 base::MessageLoop::current()->RunUntilIdle();
264 AutocompleteInput input(text, base::string16::npos, base::string16(), 264 AutocompleteInput input(text, base::string16::npos, base::string16(),
265 GURL(), AutocompleteInput::INVALID_SPEC, 265 GURL(), metrics::OmniboxEventProto::INVALID_SPEC,
266 prevent_inline_autocomplete, false, true, true); 266 prevent_inline_autocomplete, false, true, true);
267 provider_->Start(input, false); 267 provider_->Start(input, false);
268 EXPECT_TRUE(provider_->done()); 268 EXPECT_TRUE(provider_->done());
269 269
270 ac_matches_ = provider_->matches(); 270 ac_matches_ = provider_->matches();
271 271
272 // We should have gotten back at most AutocompleteProvider::kMaxMatches. 272 // We should have gotten back at most AutocompleteProvider::kMaxMatches.
273 EXPECT_LE(ac_matches_.size(), AutocompleteProvider::kMaxMatches); 273 EXPECT_LE(ac_matches_.size(), AutocompleteProvider::kMaxMatches);
274 274
275 // If the number of expected and actual matches aren't equal then we need 275 // If the number of expected and actual matches aren't equal then we need
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 730
731 TEST_F(HQPOrderingTest, TEAMatch) { 731 TEST_F(HQPOrderingTest, TEAMatch) {
732 std::vector<std::string> expected_urls; 732 std::vector<std::string> expected_urls;
733 expected_urls.push_back("http://www.teamliquid.net/"); 733 expected_urls.push_back("http://www.teamliquid.net/");
734 expected_urls.push_back("http://www.teamliquid.net/tlpd"); 734 expected_urls.push_back("http://www.teamliquid.net/tlpd");
735 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); 735 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players");
736 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, 736 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true,
737 ASCIIToUTF16("www.teamliquid.net"), 737 ASCIIToUTF16("www.teamliquid.net"),
738 ASCIIToUTF16("mliquid.net")); 738 ASCIIToUTF16("mliquid.net"));
739 } 739 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698