| Index: chrome/browser/autocomplete/history_contents_provider_unittest.cc
|
| diff --git a/chrome/browser/autocomplete/history_contents_provider_unittest.cc b/chrome/browser/autocomplete/history_contents_provider_unittest.cc
|
| index 54e29d3fe7c33c9d3f4729c160e62488d3d6928d..886893904b7be0b4b3aff7ba608c599af3cc448c 100644
|
| --- a/chrome/browser/autocomplete/history_contents_provider_unittest.cc
|
| +++ b/chrome/browser/autocomplete/history_contents_provider_unittest.cc
|
| @@ -132,8 +132,9 @@ class HistoryContentsProviderBodyOnlyTest : public HistoryContentsProviderTest {
|
| };
|
|
|
| TEST_F(HistoryContentsProviderTest, Body) {
|
| - AutocompleteInput input(ASCIIToUTF16("FOO"), string16::npos, string16(), true,
|
| - false, true, AutocompleteInput::ALL_MATCHES);
|
| + AutocompleteInput input(ASCIIToUTF16("FOO"), string16::npos, string16(),
|
| + GURL(), true, false, true,
|
| + AutocompleteInput::ALL_MATCHES);
|
| RunQuery(input, false);
|
|
|
| // The results should be the first two pages, in decreasing order.
|
| @@ -147,7 +148,8 @@ TEST_F(HistoryContentsProviderTest, Body) {
|
|
|
| TEST_F(HistoryContentsProviderTest, Title) {
|
| AutocompleteInput input(ASCIIToUTF16("PAGEONE"), string16::npos, string16(),
|
| - true, false, true, AutocompleteInput::ALL_MATCHES);
|
| + GURL(), true, false, true,
|
| + AutocompleteInput::ALL_MATCHES);
|
| RunQuery(input, false);
|
|
|
| // The results should be the first two pages.
|
| @@ -164,7 +166,7 @@ TEST_F(HistoryContentsProviderTest, MinimalChanges) {
|
| // A minimal changes request when there have been no real queries should
|
| // give us no results.
|
| AutocompleteInput sync_input(ASCIIToUTF16("PAGEONE"), string16::npos,
|
| - string16(), true, false, true,
|
| + string16(), GURL(), true, false, true,
|
| AutocompleteInput::SYNCHRONOUS_MATCHES);
|
| RunQuery(sync_input, true);
|
| const ACMatches& m1 = matches();
|
| @@ -172,7 +174,7 @@ TEST_F(HistoryContentsProviderTest, MinimalChanges) {
|
|
|
| // Now do a "regular" query to get the results.
|
| AutocompleteInput async_input(ASCIIToUTF16("PAGEONE"), string16::npos,
|
| - string16(), true, false, true,
|
| + string16(), GURL(), true, false, true,
|
| AutocompleteInput::ALL_MATCHES);
|
| RunQuery(async_input, false);
|
| const ACMatches& m2 = matches();
|
| @@ -189,7 +191,7 @@ TEST_F(HistoryContentsProviderBodyOnlyTest, MinimalChanges) {
|
| // A minimal changes request when there have been no real queries should
|
| // give us no results.
|
| AutocompleteInput sync_input(ASCIIToUTF16("PAGEONE"), string16::npos,
|
| - string16(), true, false, true,
|
| + string16(), GURL(), true, false, true,
|
| AutocompleteInput::SYNCHRONOUS_MATCHES);
|
| RunQuery(sync_input, true);
|
| const ACMatches& m1 = matches();
|
| @@ -197,7 +199,7 @@ TEST_F(HistoryContentsProviderBodyOnlyTest, MinimalChanges) {
|
|
|
| // Now do a "regular" query to get no results because we are body-only.
|
| AutocompleteInput async_input(ASCIIToUTF16("PAGEONE"), string16::npos,
|
| - string16(), true, false, true,
|
| + string16(), GURL(), true, false, true,
|
| AutocompleteInput::ALL_MATCHES);
|
| RunQuery(async_input, false);
|
| const ACMatches& m2 = matches();
|
| @@ -212,8 +214,9 @@ TEST_F(HistoryContentsProviderBodyOnlyTest, MinimalChanges) {
|
|
|
| // Tests that history is deleted properly.
|
| TEST_F(HistoryContentsProviderTest, DeleteMatch) {
|
| - AutocompleteInput input(ASCIIToUTF16("bar"), string16::npos, string16(), true,
|
| - false, true, AutocompleteInput::ALL_MATCHES);
|
| + AutocompleteInput input(ASCIIToUTF16("bar"), string16::npos, string16(),
|
| + GURL(), true, false, true,
|
| + AutocompleteInput::ALL_MATCHES);
|
| RunQuery(input, false);
|
|
|
| // Query; the result should be the third page.
|
| @@ -239,8 +242,9 @@ TEST_F(HistoryContentsProviderTest, DeleteStarredMatch) {
|
| ASCIIToUTF16("bar"));
|
|
|
| // Get the match to delete its history
|
| - AutocompleteInput input(ASCIIToUTF16("bar"), string16::npos, string16(), true,
|
| - false, true, AutocompleteInput::ALL_MATCHES);
|
| + AutocompleteInput input(ASCIIToUTF16("bar"), string16::npos, string16(),
|
| + GURL(), true, false, true,
|
| + AutocompleteInput::ALL_MATCHES);
|
| RunQuery(input, false);
|
| const ACMatches& m = matches();
|
| ASSERT_EQ(1U, m.size());
|
| @@ -251,7 +255,7 @@ TEST_F(HistoryContentsProviderTest, DeleteStarredMatch) {
|
|
|
| // Run a query that would only match history (but the history is deleted)
|
| AutocompleteInput you_input(ASCIIToUTF16("you"), string16::npos, string16(),
|
| - true, false, true,
|
| + GURL(), true, false, true,
|
| AutocompleteInput::ALL_MATCHES);
|
| RunQuery(you_input, false);
|
| EXPECT_EQ(0U, matches().size());
|
| @@ -269,8 +273,9 @@ TEST_F(HistoryContentsProviderTest, CullSearchResults) {
|
| template_url_service->SetDefaultSearchProvider(template_url);
|
| template_url_service->Load();
|
|
|
| - AutocompleteInput input(ASCIIToUTF16("moo"), string16::npos, string16(), true,
|
| - false, true, AutocompleteInput::ALL_MATCHES);
|
| + AutocompleteInput input(ASCIIToUTF16("moo"), string16::npos, string16(),
|
| + GURL(), true, false, true,
|
| + AutocompleteInput::ALL_MATCHES);
|
| RunQuery(input, false);
|
|
|
| // Run a query that is found on a search result page and on the main page
|
|
|