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

Unified Diff: chrome/browser/autocomplete/history_url_provider_unittest.cc

Issue 11414303: Make Google Search autocomplete provider cursor aware. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/autocomplete/history_url_provider_unittest.cc
diff --git a/chrome/browser/autocomplete/history_url_provider_unittest.cc b/chrome/browser/autocomplete/history_url_provider_unittest.cc
index cfbe0d740cc56c67e3bed84e1e58b063c806fe02..ae92c607282f39354e96b684245c84717e957ff0 100644
--- a/chrome/browser/autocomplete/history_url_provider_unittest.cc
+++ b/chrome/browser/autocomplete/history_url_provider_unittest.cc
@@ -237,8 +237,9 @@ void HistoryURLProviderTest::RunTest(const string16 text,
bool prevent_inline_autocomplete,
const std::string* expected_urls,
size_t num_results) {
- AutocompleteInput input(text, desired_tld, prevent_inline_autocomplete,
- false, true, AutocompleteInput::ALL_MATCHES);
+ AutocompleteInput input(text, string16::npos, desired_tld,
+ prevent_inline_autocomplete, false, true,
+ AutocompleteInput::ALL_MATCHES);
autocomplete_->Start(input, false);
if (!autocomplete_->done())
MessageLoop::current()->Run();
@@ -263,7 +264,7 @@ void HistoryURLProviderTest::RunTest(const string16 text,
void HistoryURLProviderTest::RunAdjustOffsetTest(const string16 text,
size_t expected_offset) {
- AutocompleteInput input(text, string16(), false, false, true,
+ AutocompleteInput input(text, string16::npos, string16(), false, false, true,
AutocompleteInput::ALL_MATCHES);
autocomplete_->Start(input, false);
if (!autocomplete_->done())
@@ -538,8 +539,8 @@ TEST_F(HistoryURLProviderTest, EmptyVisits) {
// Wait for history to create the in memory DB.
profile_->BlockUntilHistoryProcessesPendingRequests();
- AutocompleteInput input(ASCIIToUTF16("p"), string16(), false, false, true,
- AutocompleteInput::ALL_MATCHES);
+ AutocompleteInput input(ASCIIToUTF16("p"), string16::npos, string16(), false,
+ false, true, AutocompleteInput::ALL_MATCHES);
autocomplete_->Start(input, false);
// HistoryURLProvider shouldn't be done (waiting on async results).
EXPECT_FALSE(autocomplete_->done());
@@ -574,8 +575,8 @@ TEST_F(HistoryURLProviderTestNoDB, NavigateWithoutDB) {
}
TEST_F(HistoryURLProviderTest, DontAutocompleteOnTrailingWhitespace) {
- AutocompleteInput input(ASCIIToUTF16("slash "), string16(), false,
- false, true, AutocompleteInput::ALL_MATCHES);
+ AutocompleteInput input(ASCIIToUTF16("slash "), string16::npos, string16(),
+ false, false, true, AutocompleteInput::ALL_MATCHES);
autocomplete_->Start(input, false);
if (!autocomplete_->done())
MessageLoop::current()->Run();
@@ -703,8 +704,9 @@ TEST_F(HistoryURLProviderTest, CrashDueToFixup) {
"\\@st"
};
for (size_t i = 0; i < arraysize(test_cases); ++i) {
- AutocompleteInput input(ASCIIToUTF16(test_cases[i]), string16(), false,
- false, true, AutocompleteInput::ALL_MATCHES);
+ AutocompleteInput input(ASCIIToUTF16(test_cases[i]), string16::npos,
+ string16(), false, false, true,
+ AutocompleteInput::ALL_MATCHES);
autocomplete_->Start(input, false);
if (!autocomplete_->done())
MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698