| Index: chrome/browser/autofill/autofill_manager_unittest.cc
|
| ===================================================================
|
| --- chrome/browser/autofill/autofill_manager_unittest.cc (revision 66219)
|
| +++ chrome/browser/autofill/autofill_manager_unittest.cc (working copy)
|
| @@ -4,7 +4,6 @@
|
|
|
| #include <vector>
|
|
|
| -#include "app/l10n_util.h"
|
| #include "base/ref_counted.h"
|
| #include "base/scoped_ptr.h"
|
| #include "base/scoped_vector.h"
|
| @@ -24,7 +23,6 @@
|
| #include "chrome/common/pref_names.h"
|
| #include "chrome/common/render_messages.h"
|
| #include "googleurl/src/gurl.h"
|
| -#include "grit/generated_resources.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "webkit/glue/form_data.h"
|
| #include "webkit/glue/form_field.h"
|
| @@ -61,14 +59,6 @@
|
| web_profiles_->push_back(profile);
|
| }
|
|
|
| - void ClearAutoFillProfiles() {
|
| - web_profiles_.reset();
|
| - }
|
| -
|
| - void ClearCreditCards() {
|
| - credit_cards_.reset();
|
| - }
|
| -
|
| private:
|
| void CreateTestAutoFillProfiles(ScopedVector<AutoFillProfile>* profiles) {
|
| AutoFillProfile* profile = new AutoFillProfile;
|
| @@ -120,8 +110,7 @@
|
| public:
|
| TestAutoFillManager(TabContents* tab_contents,
|
| TestPersonalDataManager* personal_manager)
|
| - : AutoFillManager(tab_contents, NULL),
|
| - autofill_enabled_(true) {
|
| + : AutoFillManager(tab_contents, NULL) {
|
| test_personal_data_ = personal_manager;
|
| set_personal_data_manager(personal_manager);
|
| // Download manager requests are disabled for purposes of this unit-test.
|
| @@ -129,12 +118,8 @@
|
| set_disable_download_manager_requests(true);
|
| }
|
|
|
| - virtual bool IsAutoFillEnabled() const { return autofill_enabled_; }
|
| + virtual bool IsAutoFillEnabled() const { return true; }
|
|
|
| - void set_autofill_enabled(bool autofill_enabled) {
|
| - autofill_enabled_ = autofill_enabled;
|
| - }
|
| -
|
| AutoFillProfile* GetLabeledProfile(const char* label) {
|
| return test_personal_data_->GetLabeledProfile(label);
|
| }
|
| @@ -145,7 +130,6 @@
|
|
|
| private:
|
| TestPersonalDataManager* test_personal_data_;
|
| - bool autofill_enabled_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(TestAutoFillManager);
|
| };
|
| @@ -309,12 +293,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -355,12 +338,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "E", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -412,111 +394,10 @@
|
|
|
| autofill_test::CreateTestFormField(
|
| "Username", "username", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| EXPECT_FALSE(
|
| - autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
| }
|
|
|
| -// Test that we return no suggestions when autofill is disabled.
|
| -TEST_F(AutoFillManagerTest, GetProfileSuggestionsAutofillDisabledByUser) {
|
| - FormData form;
|
| - CreateTestAddressFormData(&form);
|
| -
|
| - // Set up our FormStructures.
|
| - std::vector<FormData> forms;
|
| - forms.push_back(form);
|
| - autofill_manager_->FormsSeen(forms);
|
| -
|
| - // Disable AutoFill.
|
| - autofill_manager_->set_autofill_enabled(false);
|
| -
|
| - // The page ID sent to the AutoFillManager from the RenderView, used to send
|
| - // an IPC message back to the renderer.
|
| - const int kPageID = 1;
|
| -
|
| - webkit_glue::FormField field;
|
| - autofill_test::CreateTestFormField(
|
| - "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_FALSE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -}
|
| -
|
| -// Test that we return a warning explaining that autofill suggestions are
|
| -// unavailable when the form method is GET rather than POST.
|
| -TEST_F(AutoFillManagerTest, GetProfileSuggestionsMethodGet) {
|
| - FormData form;
|
| - CreateTestAddressFormData(&form);
|
| - form.method = ASCIIToUTF16("GET");
|
| -
|
| - // Set up our FormStructures.
|
| - std::vector<FormData> forms;
|
| - forms.push_back(form);
|
| - autofill_manager_->FormsSeen(forms);
|
| -
|
| - // The page ID sent to the AutoFillManager from the RenderView, used to send
|
| - // an IPC message back to the renderer.
|
| - const int kPageID = 1;
|
| -
|
| - webkit_glue::FormField field;
|
| - autofill_test::CreateTestFormField(
|
| - "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -
|
| - // No suggestions provided, so send an empty vector as the results.
|
| - // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| -
|
| - // Test that we sent the right message to the renderer.
|
| - int page_id = 0;
|
| - std::vector<string16> values;
|
| - std::vector<string16> labels;
|
| - std::vector<string16> icons;
|
| - EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels,
|
| - &icons));
|
| - EXPECT_EQ(kPageID, page_id);
|
| - ASSERT_EQ(1U, values.size());
|
| - EXPECT_EQ(l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_FORM_DISABLED),
|
| - values[0]);
|
| - ASSERT_EQ(1U, labels.size());
|
| - EXPECT_EQ(string16(), labels[0]);
|
| - ASSERT_EQ(1U, icons.size());
|
| - EXPECT_EQ(string16(), icons[0]);
|
| -
|
| - // Now add some Autocomplete suggestions. We should return the autocomplete
|
| - // suggestions and the warning; these will be culled by the renderer.
|
| - process()->sink().ClearMessages();
|
| - const int kPageID2 = 2;
|
| - rvh()->ResetAutoFillState(kPageID2);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -
|
| - std::vector<string16> suggestions;
|
| - suggestions.push_back(ASCIIToUTF16("Jay"));
|
| - suggestions.push_back(ASCIIToUTF16("Jason"));
|
| - rvh()->AutocompleteSuggestionsReturned(suggestions);
|
| -
|
| - EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels,
|
| - &icons));
|
| - EXPECT_EQ(kPageID2, page_id);
|
| - ASSERT_EQ(3U, values.size());
|
| - EXPECT_EQ(l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_FORM_DISABLED),
|
| - values[0]);
|
| - EXPECT_EQ(ASCIIToUTF16("Jay"), values[1]);
|
| - EXPECT_EQ(ASCIIToUTF16("Jason"), values[2]);
|
| - ASSERT_EQ(3U, labels.size());
|
| - EXPECT_EQ(string16(), labels[0]);
|
| - EXPECT_EQ(string16(), labels[1]);
|
| - EXPECT_EQ(string16(), labels[2]);
|
| - ASSERT_EQ(3U, icons.size());
|
| - EXPECT_EQ(string16(), icons[0]);
|
| - EXPECT_EQ(string16(), icons[1]);
|
| - EXPECT_EQ(string16(), icons[2]);
|
| -
|
| - // Now clear the test profiles and try again -- we shouldn't return a warning.
|
| - test_personal_data_->ClearAutoFillProfiles();
|
| - EXPECT_FALSE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -}
|
| -
|
| // Test that we return all credit card profile suggestions when all form fields
|
| // are empty.
|
| TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsEmptyValue) {
|
| @@ -535,12 +416,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "Card Number", "cardnumber", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -579,12 +459,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "Card Number", "cardnumber", "4", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -620,12 +499,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "Name on Card", "nameoncard", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -646,8 +524,8 @@
|
| EXPECT_EQ(ASCIIToUTF16("masterCardCC"), icons[1]);
|
| }
|
|
|
| -// Test that we return a warning explaining that credit card profile suggestions
|
| -// are unavailable when the form is not https.
|
| +// Test that we return no credit card profile suggestions when the form is not
|
| +// https.
|
| TEST_F(AutoFillManagerTest, GetCreditCardSuggestionsNonHTTPS) {
|
| FormData form;
|
| CreateTestCreditCardFormData(&form, false);
|
| @@ -664,61 +542,8 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "Card Number", "cardnumber", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -
|
| - // No suggestions provided, so send an empty vector as the results.
|
| - // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| -
|
| - // Test that we sent the right message to the renderer.
|
| - int page_id = 0;
|
| - std::vector<string16> values;
|
| - std::vector<string16> labels;
|
| - std::vector<string16> icons;
|
| - EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels,
|
| - &icons));
|
| - EXPECT_EQ(kPageID, page_id);
|
| - ASSERT_EQ(1U, values.size());
|
| - EXPECT_EQ(l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION),
|
| - values[0]);
|
| - ASSERT_EQ(1U, labels.size());
|
| - EXPECT_EQ(string16(), labels[0]);
|
| - ASSERT_EQ(1U, icons.size());
|
| - EXPECT_EQ(string16(), icons[0]);
|
| -
|
| - // Now add some Autocomplete suggestions. We should show the autocomplete
|
| - // suggestions and the warning.
|
| - process()->sink().ClearMessages();
|
| - const int kPageID2 = 2;
|
| - rvh()->ResetAutoFillState(kPageID2);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -
|
| - std::vector<string16> suggestions;
|
| - suggestions.push_back(ASCIIToUTF16("Jay"));
|
| - suggestions.push_back(ASCIIToUTF16("Jason"));
|
| - rvh()->AutocompleteSuggestionsReturned(suggestions);
|
| -
|
| - EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels,
|
| - &icons));
|
| - EXPECT_EQ(kPageID2, page_id);
|
| - ASSERT_EQ(3U, values.size());
|
| - EXPECT_EQ(l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION),
|
| - values[0]);
|
| - EXPECT_EQ(ASCIIToUTF16("Jay"), values[1]);
|
| - EXPECT_EQ(ASCIIToUTF16("Jason"), values[2]);
|
| - ASSERT_EQ(3U, labels.size());
|
| - EXPECT_EQ(string16(), labels[0]);
|
| - EXPECT_EQ(string16(), labels[1]);
|
| - EXPECT_EQ(string16(), labels[2]);
|
| - ASSERT_EQ(3U, icons.size());
|
| - EXPECT_EQ(string16(), icons[0]);
|
| - EXPECT_EQ(string16(), icons[1]);
|
| - EXPECT_EQ(string16(), icons[2]);
|
| -
|
| - // Clear the test credit cards and try again -- we shouldn't return a warning.
|
| - test_personal_data_->ClearCreditCards();
|
| - EXPECT_FALSE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_FALSE(
|
| + autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
| }
|
|
|
| // Test that we return profile and credit card suggestions for combined forms.
|
| @@ -739,12 +564,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right address suggestions to the renderer.
|
| int page_id = 0;
|
| @@ -769,12 +593,11 @@
|
| process()->sink().ClearMessages();
|
| autofill_test::CreateTestFormField(
|
| "Card Number", "cardnumber", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the credit card suggestions to the renderer.
|
| page_id = 0;
|
| @@ -793,9 +616,7 @@
|
| }
|
|
|
| // Test that for non-https forms with both address and credit card fields, we
|
| -// only return address suggestions. Instead of credit card suggestions, we
|
| -// should return a warning explaining that credit card profile suggestions are
|
| -// unavailable when the form is not https.
|
| +// only return address suggestions.
|
| TEST_F(AutoFillManagerTest, GetAddressAndCreditCardSuggestionsNonHttps) {
|
| FormData form;
|
| CreateTestAddressFormData(&form);
|
| @@ -813,12 +634,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right address suggestions to the renderer.
|
| int page_id = 0;
|
| @@ -840,31 +660,10 @@
|
| EXPECT_EQ(string16(), icons[0]);
|
| EXPECT_EQ(string16(), icons[1]);
|
|
|
| - process()->sink().ClearMessages();
|
| autofill_test::CreateTestFormField(
|
| "Card Number", "cardnumber", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| -
|
| - // No suggestions provided, so send an empty vector as the results.
|
| - // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| -
|
| - // Test that we sent the right message to the renderer.
|
| - EXPECT_TRUE(GetAutoFillSuggestionsMessage(&page_id, &values, &labels,
|
| - &icons));
|
| - EXPECT_EQ(kPageID, page_id);
|
| - ASSERT_EQ(1U, values.size());
|
| - EXPECT_EQ(l10n_util::GetStringUTF16(IDS_AUTOFILL_WARNING_INSECURE_CONNECTION),
|
| - values[0]);
|
| - ASSERT_EQ(1U, labels.size());
|
| - EXPECT_EQ(string16(), labels[0]);
|
| - ASSERT_EQ(1U, icons.size());
|
| - EXPECT_EQ(string16(), icons[0]);
|
| -
|
| - // Clear the test credit cards and try again -- we shouldn't return a warning.
|
| - test_personal_data_->ClearCreditCards();
|
| - EXPECT_FALSE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_FALSE(
|
| + autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
| }
|
|
|
| // Test that we correctly combine autofill and autocomplete suggestions.
|
| @@ -884,15 +683,14 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(false, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, false, field));
|
|
|
| // Add some Autocomplete suggestions.
|
| // This triggers the combined message send.
|
| std::vector<string16> suggestions;
|
| suggestions.push_back(ASCIIToUTF16("Jay"));
|
| suggestions.push_back(ASCIIToUTF16("Jason"));
|
| - rvh()->AutocompleteSuggestionsReturned(suggestions);
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, suggestions);
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -937,12 +735,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(true, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, true, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -981,15 +778,14 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "Some Field", "somefield", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_FALSE(autofill_manager_->GetAutoFillSuggestions(true, field));
|
| + EXPECT_FALSE(autofill_manager_->GetAutoFillSuggestions(kPageID, true, field));
|
|
|
| // Add some Autocomplete suggestions.
|
| // This triggers the combined message send.
|
| std::vector<string16> suggestions;
|
| suggestions.push_back(ASCIIToUTF16("one"));
|
| suggestions.push_back(ASCIIToUTF16("two"));
|
| - rvh()->AutocompleteSuggestionsReturned(suggestions);
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, suggestions);
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
| @@ -1034,12 +830,11 @@
|
| webkit_glue::FormField field;
|
| autofill_test::CreateTestFormField(
|
| "First Name", "firstname", "", "text", &field);
|
| - rvh()->ResetAutoFillState(kPageID);
|
| - EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(true, field));
|
| + EXPECT_TRUE(autofill_manager_->GetAutoFillSuggestions(kPageID, true, field));
|
|
|
| // No suggestions provided, so send an empty vector as the results.
|
| // This triggers the combined message send.
|
| - rvh()->AutocompleteSuggestionsReturned(std::vector<string16>());
|
| + rvh()->AutocompleteSuggestionsReturned(kPageID, std::vector<string16>());
|
|
|
| // Test that we sent the right message to the renderer.
|
| int page_id = 0;
|
|
|