Chromium Code Reviews| 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 939aa8ce39404c0c0a62ad55f6d6cf0979abd0d2..b14f6512c5c7c6c2bdda661e5cd3647b351ec922 100644 |
| --- a/components/autofill/content/browser/autofill_driver_impl_unittest.cc |
| +++ b/components/autofill/content/browser/autofill_driver_impl_unittest.cc |
| @@ -136,8 +136,11 @@ class AutofillDriverImplTest : public ChromeRenderViewHostTestHarness { |
| return false; |
| Tuple1<base::string16> autofill_param; |
| switch (messageID) { |
| - case AutofillMsg_SetNodeText::ID: |
| - AutofillMsg_SetNodeText::Read(message, &autofill_param); |
| + case AutofillMsg_FillFieldWithValue::ID: |
| + AutofillMsg_FillFieldWithValue::Read(message, &autofill_param); |
|
Ilya Sherman
2014/03/01 02:57:37
Please check the return value of Read(), and retur
ziran.sun
2014/03/04 15:30:19
Done.
|
| + break; |
| + case AutofillMsg_PreviewFieldWithValue::ID: |
| + AutofillMsg_PreviewFieldWithValue::Read(message, &autofill_param); |
|
Ilya Sherman
2014/03/01 02:57:37
Ditto
ziran.sun
2014/03/04 15:30:19
Done.
|
| break; |
| case AutofillMsg_AcceptDataListSuggestion::ID: |
| AutofillMsg_AcceptDataListSuggestion::Read(message, &autofill_param); |
| @@ -281,13 +284,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 |