Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10553)

Unified Diff: chrome/renderer/autofill/form_autofill_browsertest.cc

Issue 605683002: Autofill browser_tests: set autofilled property after autofilled value is set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update code as per review comments. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698