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

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

Issue 15659015: Remember the initial checked state of {radiobutton|checkbox}. If autofill flow is not autocheckout,… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | components/autofill/renderer/form_autofill_util.cc » ('j') | 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 d63e2fb88fcbeaa8d21670bc4e110ecdb358085d..31d140391e3ac132c1666047c040b88ad4452d4a 100644
--- a/chrome/renderer/autofill/form_autofill_browsertest.cc
+++ b/chrome/renderer/autofill/form_autofill_browsertest.cc
@@ -210,7 +210,7 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldAutofilled) {
// We should be able to extract a radio or a checkbox field that has been
// autofilled.
TEST_F(FormAutofillTest, WebFormControlElementToClickableFormField) {
- LoadHTML("<INPUT type=\"checkbox\" id=\"checkbox\" value=\"mail\"/>"
+ LoadHTML("<INPUT type=\"checkbox\" id=\"checkbox\" value=\"mail\" checked/>"
"<INPUT type=\"radio\" id=\"radio\" value=\"male\"/>");
WebFrame* frame = GetMainFrame();
@@ -228,6 +228,7 @@ TEST_F(FormAutofillTest, WebFormControlElementToClickableFormField) {
expected.form_control_type = "checkbox";
expected.is_autofilled = true;
expected.is_checkable = true;
+ expected.is_checked = true;
EXPECT_FORM_FIELD_DATA_EQUALS(expected, result);
web_element = frame->document().getElementById("radio");
@@ -239,6 +240,7 @@ TEST_F(FormAutofillTest, WebFormControlElementToClickableFormField) {
expected.form_control_type = "radio";
expected.is_autofilled = true;
expected.is_checkable = true;
+ expected.is_checked = false;
EXPECT_FORM_FIELD_DATA_EQUALS(expected, result);
}
« no previous file with comments | « no previous file | components/autofill/renderer/form_autofill_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698