| Index: components/autofill/content/browser/autofill_driver_impl_unittest.cc
|
| diff --git a/components/autofill/content/browser/autofill_driver_impl_unittest.cc b/components/autofill/content/browser/autofill_driver_impl_unittest.cc
|
| index 1e69b43f97ee2ae91bcb1535973a8e0c06fcf1aa..0bdfe98657b8023fac0dff00fc841cc7b0e3046d 100644
|
| --- a/components/autofill/content/browser/autofill_driver_impl_unittest.cc
|
| +++ b/components/autofill/content/browser/autofill_driver_impl_unittest.cc
|
| @@ -159,8 +159,12 @@ class AutofillDriverImplTest : public ChromeRenderViewHostTestHarness {
|
| return false;
|
| Tuple1<base::string16> autofill_param;
|
| switch (messageID) {
|
| - case AutofillMsg_SetNodeText::ID:
|
| - if (!AutofillMsg_SetNodeText::Read(message, &autofill_param))
|
| + case AutofillMsg_FillFieldWithValue::ID:
|
| + if (!AutofillMsg_FillFieldWithValue::Read(message, &autofill_param))
|
| + return false;
|
| + break;
|
| + case AutofillMsg_PreviewFieldWithValue::ID:
|
| + if (!AutofillMsg_PreviewFieldWithValue::Read(message, &autofill_param))
|
| return false;
|
| break;
|
| case AutofillMsg_AcceptDataListSuggestion::ID:
|
| @@ -168,7 +172,7 @@ class AutofillDriverImplTest : public ChromeRenderViewHostTestHarness {
|
| &autofill_param))
|
| return false;
|
| break;
|
| - case AutofillMsg_AcceptPasswordAutofillSuggestion::ID:
|
| + case AutofillMsg_AcceptPasswordAutofillSuggestion::ID:
|
| if (!AutofillMsg_AcceptPasswordAutofillSuggestion::Read(
|
| message,
|
| &autofill_param))
|
| @@ -318,13 +322,23 @@ TEST_F(AutofillDriverImplTest, ClearPreviewedFormSentToRenderer) {
|
| EXPECT_TRUE(HasMessageMatchingID(AutofillMsg_ClearPreviewedForm::ID));
|
| }
|
|
|
| -TEST_F(AutofillDriverImplTest, SetNodeText) {
|
| +TEST_F(AutofillDriverImplTest, FillFieldWithValue) {
|
| base::string16 input_value(base::ASCIIToUTF16("barqux"));
|
| base::string16 output_value;
|
| - driver_->RendererShouldSetNodeText(input_value);
|
| - EXPECT_TRUE(GetString16FromMessageWithID(AutofillMsg_SetNodeText::ID,
|
| + driver_->RendererShouldFillFieldWithValue(input_value);
|
| + EXPECT_TRUE(GetString16FromMessageWithID(AutofillMsg_FillFieldWithValue::ID,
|
| &output_value));
|
| EXPECT_EQ(input_value, output_value);
|
| }
|
|
|
| +TEST_F(AutofillDriverImplTest, PreviewFieldWithValue) {
|
| + base::string16 input_value(base::ASCIIToUTF16("barqux"));
|
| + base::string16 output_value;
|
| + driver_->RendererShouldPreviewFieldWithValue(input_value);
|
| + EXPECT_TRUE(GetString16FromMessageWithID(
|
| + AutofillMsg_PreviewFieldWithValue::ID,
|
| + &output_value));
|
| + EXPECT_EQ(input_value, output_value);
|
| +}
|
| +
|
| } // namespace autofill
|
|
|