Commit ca4f4214 authored by ziran.sun's avatar ziran.sun Committed by Commit bot

Autofill browser_tests: set autofilled property after autofilled value is set.

R=isherman@chromium.org
BUG=412311

Review URL: https://codereview.chromium.org/605683002

Cr-Commit-Position: refs/heads/master@{#297020}
parent a9c9ce4e
...@@ -3194,14 +3194,12 @@ TEST_F(FormAutofillTest, ClearFormWithNodeContainingSelectOne) { ...@@ -3194,14 +3194,12 @@ TEST_F(FormAutofillTest, ClearFormWithNodeContainingSelectOne) {
WebInputElement lastname = WebInputElement lastname =
web_frame->document().getElementById("lastname").to<WebInputElement>(); web_frame->document().getElementById("lastname").to<WebInputElement>();
lastname.setAutofilled(true); lastname.setAutofilled(true);
WebInputElement state =
web_frame->document().getElementById("state").to<WebInputElement>();
state.setAutofilled(true);
// Set the value of the select-one. // Set the value and auto-filled attribute of the state element.
WebSelectElement select_element = WebSelectElement state =
web_frame->document().getElementById("state").to<WebSelectElement>(); web_frame->document().getElementById("state").to<WebSelectElement>();
select_element.setValue(WebString::fromUTF8("AK")); state.setValue(WebString::fromUTF8("AK"));
state.setAutofilled(true);
// Clear the form. // Clear the form.
EXPECT_TRUE(form_cache.ClearFormWithElement(firstname)); EXPECT_TRUE(form_cache.ClearFormWithElement(firstname));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment