Index: chrome/renderer/autofill/form_autofill_browsertest.cc |
diff --git a/chrome/renderer/autofill/form_autofill_browsertest.cc b/chrome/renderer/autofill/form_autofill_browsertest.cc |
index abffbf6c06b12d618e85265cf9d99d7ceb9e7929..6e4db5e2ae0f96241482b201e1ee9bf349684b62 100644 |
--- a/chrome/renderer/autofill/form_autofill_browsertest.cc |
+++ b/chrome/renderer/autofill/form_autofill_browsertest.cc |
@@ -3199,14 +3199,12 @@ TEST_F(FormAutofillTest, ClearFormWithNodeContainingSelectOne) { |
WebInputElement lastname = |
web_frame->document().getElementById("lastname").to<WebInputElement>(); |
lastname.setAutofilled(true); |
- WebInputElement state = |
- web_frame->document().getElementById("state").to<WebInputElement>(); |
- state.setAutofilled(true); |
- // Set the value of the select-one. |
- WebSelectElement select_element = |
+ // Set the value and auto-filled attribute of the state element. |
+ WebSelectElement state = |
web_frame->document().getElementById("state").to<WebSelectElement>(); |
- select_element.setValue(WebString::fromUTF8("AK")); |
+ state.setValue(WebString::fromUTF8("AK")); |
+ state.setAutofilled(true); |
// Clear the form. |
EXPECT_TRUE(form_cache.ClearFormWithElement(firstname)); |