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

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

Issue 455653002: Use single quotes in Layout tests as they don't need to be escaped (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix failing tests Created 6 years, 4 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 | « chrome/renderer/autofill/autofill_renderer_browsertest.cc ('k') | 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 5b8a6f3887fb02c99a466ec44ead1b42cbd6bc82..abffbf6c06b12d618e85265cf9d99d7ceb9e7929 100644
--- a/chrome/renderer/autofill/form_autofill_browsertest.cc
+++ b/chrome/renderer/autofill/form_autofill_browsertest.cc
@@ -58,35 +58,35 @@ struct AutofillFieldCase {
};
static const char kFormHtml[] =
- "<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"hidden\" id=\"imhidden\"/>"
- " <INPUT type=\"text\" id=\"notempty\" value=\"Hi\"/>"
- " <INPUT type=\"text\" autocomplete=\"off\" id=\"noautocomplete\"/>"
- " <INPUT type=\"text\" disabled=\"disabled\" id=\"notenabled\"/>"
- " <INPUT type=\"text\" readonly id=\"readonly\"/>"
- " <INPUT type=\"text\" style=\"visibility: hidden\""
- " id=\"invisible\"/>"
- " <INPUT type=\"text\" style=\"display: none\" id=\"displaynone\"/>"
- " <INPUT type=\"month\" id=\"month\"/>"
- " <INPUT type=\"month\" id=\"month-nonempty\" value=\"2011-12\"/>"
- " <SELECT id=\"select\">"
+ "<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='hidden' id='imhidden'/>"
+ " <INPUT type='text' id='notempty' value='Hi'/>"
+ " <INPUT type='text' autocomplete='off' id='noautocomplete'/>"
+ " <INPUT type='text' disabled='disabled' id='notenabled'/>"
+ " <INPUT type='text' readonly id='readonly'/>"
+ " <INPUT type='text' style='visibility: hidden'"
+ " id='invisible'/>"
+ " <INPUT type='text' style='display: none' id='displaynone'/>"
+ " <INPUT type='month' id='month'/>"
+ " <INPUT type='month' id='month-nonempty' value='2011-12'/>"
+ " <SELECT id='select'>"
" <OPTION></OPTION>"
- " <OPTION value=\"CA\">California</OPTION>"
- " <OPTION value=\"TX\">Texas</OPTION>"
+ " <OPTION value='CA'>California</OPTION>"
+ " <OPTION value='TX'>Texas</OPTION>"
" </SELECT>"
- " <SELECT id=\"select-nonempty\">"
- " <OPTION value=\"CA\" selected>California</OPTION>"
- " <OPTION value=\"TX\">Texas</OPTION>"
+ " <SELECT id='select-nonempty'>"
+ " <OPTION value='CA' selected>California</OPTION>"
+ " <OPTION value='TX'>Texas</OPTION>"
" </SELECT>"
- " <SELECT id=\"select-unchanged\">"
- " <OPTION value=\"CA\" selected>California</OPTION>"
- " <OPTION value=\"TX\">Texas</OPTION>"
+ " <SELECT id='select-unchanged'>"
+ " <OPTION value='CA' selected>California</OPTION>"
+ " <OPTION value='TX'>Texas</OPTION>"
" </SELECT>"
- " <TEXTAREA id=\"textarea\"></TEXTAREA>"
- " <TEXTAREA id=\"textarea-nonempty\">Go&#10;away!</TEXTAREA>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <TEXTAREA id='textarea'></TEXTAREA>"
+ " <TEXTAREA id='textarea-nonempty'>Go&#10;away!</TEXTAREA>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>";
} // namespace
@@ -295,7 +295,7 @@ class FormAutofillTest : public ChromeRenderViewTest {
// We should be able to extract a normal text field.
TEST_F(FormAutofillTest, WebFormControlElementToFormField) {
- LoadHTML("<INPUT type=\"text\" id=\"element\" value=\"value\"/>");
+ LoadHTML("<INPUT type='text' id='element' value='value'/>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -323,8 +323,8 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormField) {
// We should be able to extract a text field with autocomplete="off".
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldAutocompleteOff) {
- LoadHTML("<INPUT type=\"text\" id=\"element\" value=\"value\""
- " autocomplete=\"off\"/>");
+ LoadHTML("<INPUT type='text' id='element' value='value'"
+ " autocomplete='off'/>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -345,8 +345,8 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldAutocompleteOff) {
// We should be able to extract a text field with maxlength specified.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldMaxLength) {
- LoadHTML("<INPUT type=\"text\" id=\"element\" value=\"value\""
- " maxlength=\"5\"/>");
+ LoadHTML("<INPUT type='text' id='element' value='value'"
+ " maxlength='5'/>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -366,7 +366,7 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldMaxLength) {
// We should be able to extract a text field that has been autofilled.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldAutofilled) {
- LoadHTML("<INPUT type=\"text\" id=\"element\" value=\"value\"/>");
+ LoadHTML("<INPUT type='text' id='element' value='value'/>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -389,8 +389,8 @@ 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\" checked/>"
- "<INPUT type=\"radio\" id=\"radio\" value=\"male\"/>");
+ LoadHTML("<INPUT type='checkbox' id='checkbox' value='mail' checked/>"
+ "<INPUT type='radio' id='radio' value='male'/>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -425,9 +425,9 @@ TEST_F(FormAutofillTest, WebFormControlElementToClickableFormField) {
// We should be able to extract a <select> field.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldSelect) {
- LoadHTML("<SELECT id=\"element\"/>"
- " <OPTION value=\"CA\">California</OPTION>"
- " <OPTION value=\"TX\">Texas</OPTION>"
+ LoadHTML("<SELECT id='element'/>"
+ " <OPTION value='CA'>California</OPTION>"
+ " <OPTION value='TX'>Texas</OPTION>"
"</SELECT>");
WebFrame* frame = GetMainFrame();
@@ -472,9 +472,9 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldSelect) {
// When faced with <select> field with *many* options, we should trim them to a
// reasonable number.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldLongSelect) {
- std::string html = "<SELECT id=\"element\"/>";
+ std::string html = "<SELECT id='element'/>";
for (size_t i = 0; i < 2 * kMaxListSize; ++i) {
- html += base::StringPrintf("<OPTION value=\"%" PRIuS "\">"
+ html += base::StringPrintf("<OPTION value='%" PRIuS "'>"
"%" PRIuS "</OPTION>", i, i);
}
html += "</SELECT>";
@@ -494,7 +494,7 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldLongSelect) {
// We should be able to extract a <textarea> field.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldTextArea) {
- LoadHTML("<TEXTAREA id=\"element\">"
+ LoadHTML("<TEXTAREA id='element'>"
"This element's value&#10;"
"spans multiple lines."
"</TEXTAREA>");
@@ -524,7 +524,7 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldTextArea) {
// We should be able to extract an <input type="month"> field.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldMonthInput) {
- LoadHTML("<INPUT type=\"month\" id=\"element\" value=\"2011-12\">");
+ LoadHTML("<INPUT type='month' id='element' value='2011-12'>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -550,9 +550,9 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldMonthInput) {
// We should not extract the value for non-text and non-select fields.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldInvalidType) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"hidden\" id=\"hidden\" value=\"apple\"/>"
- " <INPUT type=\"submit\" id=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='hidden' id='hidden' value='apple'/>"
+ " <INPUT type='submit' id='submit' value='Send'/>"
"</FORM>");
WebFrame* frame = GetMainFrame();
@@ -580,8 +580,8 @@ TEST_F(FormAutofillTest, WebFormControlElementToFormFieldInvalidType) {
// We should be able to extract password fields.
TEST_F(FormAutofillTest, WebFormControlElementToPasswordFormField) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"password\" id=\"password\" value=\"secret\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='password' id='password' value='secret'/>"
"</FORM>");
WebFrame* frame = GetMainFrame();
@@ -603,25 +603,25 @@ TEST_F(FormAutofillTest, WebFormControlElementToPasswordFormField) {
// We should be able to extract the autocompletetype attribute.
TEST_F(FormAutofillTest, WebFormControlElementToFormFieldAutocompletetype) {
std::string html =
- "<INPUT type=\"text\" id=\"absent\"/>"
- "<INPUT type=\"text\" id=\"empty\" autocomplete=\"\"/>"
- "<INPUT type=\"text\" id=\"off\" autocomplete=\"off\"/>"
- "<INPUT type=\"text\" id=\"regular\" autocomplete=\"email\"/>"
- "<INPUT type=\"text\" id=\"multi-valued\" "
- " autocomplete=\"billing email\"/>"
- "<INPUT type=\"text\" id=\"experimental\" x-autocompletetype=\"email\"/>"
- "<INPUT type=\"month\" id=\"month\" autocomplete=\"cc-exp\"/>"
- "<SELECT id=\"select\" autocomplete=\"state\"/>"
- " <OPTION value=\"CA\">California</OPTION>"
- " <OPTION value=\"TX\">Texas</OPTION>"
+ "<INPUT type='text' id='absent'/>"
+ "<INPUT type='text' id='empty' autocomplete=''/>"
+ "<INPUT type='text' id='off' autocomplete='off'/>"
+ "<INPUT type='text' id='regular' autocomplete='email'/>"
+ "<INPUT type='text' id='multi-valued' "
+ " autocomplete='billing email'/>"
+ "<INPUT type='text' id='experimental' x-autocompletetype='email'/>"
+ "<INPUT type='month' id='month' autocomplete='cc-exp'/>"
+ "<SELECT id='select' autocomplete='state'/>"
+ " <OPTION value='CA'>California</OPTION>"
+ " <OPTION value='TX'>Texas</OPTION>"
"</SELECT>"
- "<TEXTAREA id=\"textarea\" autocomplete=\"street-address\">"
+ "<TEXTAREA id='textarea' autocomplete='street-address'>"
" Some multi-"
" lined value"
"</TEXTAREA>";
html +=
- "<INPUT type=\"text\" id=\"malicious\" autocomplete=\"" +
- std::string(10000, 'x') + "\"/>";
+ "<INPUT type='text' id='malicious' autocomplete='" +
+ std::string(10000, 'x') + "'/>";
LoadHTML(html.c_str());
WebFrame* frame = GetMainFrame();
@@ -801,29 +801,29 @@ TEST_F(FormAutofillTest, DetectTextDirectionWhenAncestorHasInlineStyle) {
}
TEST_F(FormAutofillTest, WebFormElementToFormData) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <LABEL for=\"firstname\">First name:</LABEL>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <LABEL for=\"lastname\">Last name:</LABEL>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <LABEL for=\"street-address\">Address:</LABEL>"
- " <TEXTAREA id=\"street-address\">"
- "123 Fantasy Ln.&#10;"
- "Apt. 42"
- "</TEXTAREA>"
- " <LABEL for=\"state\">State:</LABEL>"
- " <SELECT id=\"state\"/>"
- " <OPTION value=\"CA\">California</OPTION>"
- " <OPTION value=\"TX\">Texas</OPTION>"
- " </SELECT>"
- " <LABEL for=\"password\">Password:</LABEL>"
- " <INPUT type=\"password\" id=\"password\" value=\"secret\"/>"
- " <LABEL for=\"month\">Card expiration:</LABEL>"
- " <INPUT type=\"month\" id=\"month\" value=\"2011-12\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <LABEL for='firstname'>First name:</LABEL>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <LABEL for='lastname'>Last name:</LABEL>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <LABEL for='street-address'>Address:</LABEL>"
+ " <TEXTAREA id='street-address'>"
+ "123 Fantasy Ln.&#10;"
+ "Apt. 42"
+ "</TEXTAREA>"
+ " <LABEL for='state'>State:</LABEL>"
+ " <SELECT id='state'/>"
+ " <OPTION value='CA'>California</OPTION>"
+ " <OPTION value='TX'>Texas</OPTION>"
+ " </SELECT>"
+ " <LABEL for='password'>Password:</LABEL>"
+ " <INPUT type='password' id='password' value='secret'/>"
+ " <LABEL for='month'>Card expiration:</LABEL>"
+ " <INPUT type='month' id='month' value='2011-12'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
// The below inputs should be ignored
- " <LABEL for=\"notvisible\">Hidden:</LABEL>"
- " <INPUT type=\"hidden\" id=\"notvisible\" value=\"apple\"/>"
+ " <LABEL for='notvisible'>Hidden:</LABEL>"
+ " <INPUT type='hidden' id='notvisible' value='apple'/>"
"</FORM>");
WebFrame* frame = GetMainFrame();
@@ -898,9 +898,9 @@ TEST_F(FormAutofillTest, WebFormElementToFormData) {
// We should not be able to serialize a form with too many fillable fields.
TEST_F(FormAutofillTest, WebFormElementToFormDataTooManyFields) {
std::string html =
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">";
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>";
for (size_t i = 0; i < (autofill::kMaxParseableFields + 1); ++i) {
- html += "<INPUT type=\"text\"/>";
+ html += "<INPUT type='text'/>";
}
html += "</FORM>";
LoadHTML(html.c_str());
@@ -927,26 +927,26 @@ TEST_F(FormAutofillTest, WebFormElementToFormDataTooManyFields) {
TEST_F(FormAutofillTest, ExtractForms) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " First name: <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " Last name: <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " Email: <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " First name: <INPUT type='text' id='firstname' value='John'/>"
+ " Last name: <INPUT type='text' id='lastname' value='Smith'/>"
+ " Email: <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, ExtractMultipleForms) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>"
- "<FORM name=\"TestForm2\" action=\"http://zoo.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"Jack\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Adams\"/>"
- " <INPUT type=\"text\" id=\"email\" value=\"jack@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<FORM name='TestForm2' action='http://zoo.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='Jack'/>"
+ " <INPUT type='text' id='lastname' value='Adams'/>"
+ " <INPUT type='text' id='email' value='jack@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1109,10 +1109,10 @@ TEST_F(FormAutofillTest, OnlyExtractNewForms) {
// We should not extract a form if it has too few fillable fields.
TEST_F(FormAutofillTest, ExtractFormsTooFewFields) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1126,9 +1126,9 @@ TEST_F(FormAutofillTest, ExtractFormsTooFewFields) {
// We should not report additional forms for empty forms.
TEST_F(FormAutofillTest, ExtractFormsSkippedForms) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1142,7 +1142,7 @@ TEST_F(FormAutofillTest, ExtractFormsSkippedForms) {
// We should not report additional forms for empty forms.
TEST_F(FormAutofillTest, ExtractFormsNoFields) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1157,12 +1157,12 @@ TEST_F(FormAutofillTest, ExtractFormsNoFields) {
// We should not extract a form if it has too few fillable fields.
// Make sure radio and checkbox fields don't count.
TEST_F(FormAutofillTest, ExtractFormsTooFewFieldsSkipsCheckable) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"radio\" id=\"a_radio\" value=\"0\"/>"
- " <INPUT type=\"checkbox\" id=\"a_check\" value=\"1\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='radio' id='a_radio' value='0'/>"
+ " <INPUT type='checkbox' id='a_check' value='1'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1177,12 +1177,12 @@ TEST_F(FormAutofillTest, ExtractFormsTooFewFieldsSkipsCheckable) {
TEST_F(FormAutofillTest, WebFormElementToFormDataAutocomplete) {
{
// Form is not auto-completable due to autocomplete=off.
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\""
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'"
" autocomplete=off>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1204,14 +1204,14 @@ TEST_F(FormAutofillTest, WebFormElementToFormDataAutocomplete) {
{
// The firstname element is not auto-completable due to autocomplete=off.
- LoadHTML("<FORM name=\"TestForm\" action=\"http://abc.com\" "
- " method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\""
+ LoadHTML("<FORM name='TestForm' action='http://abc.com' "
+ " method='post'>"
+ " <INPUT type='text' id='firstname' value='John'"
" autocomplete=off>"
- " <INPUT type=\"text\" id=\"middlename\" value=\"Jack\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply\" value=\"Send\"/>"
+ " <INPUT type='text' id='middlename' value='Jack'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1253,13 +1253,13 @@ TEST_F(FormAutofillTest, WebFormElementToFormDataAutocomplete) {
}
TEST_F(FormAutofillTest, FindFormForInputElement) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\""
- "autocomplete=\"off\" />"
- " <INPUT type=\"text\" id=\"phone\" value=\"1.800.555.1234\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='text' id='email' value='john@example.com'"
+ "autocomplete='off' />"
+ " <INPUT type='text' id='phone' value='1.800.555.1234'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1344,16 +1344,16 @@ TEST_F(FormAutofillTest, FindFormForInputElement) {
}
TEST_F(FormAutofillTest, FindFormForTextAreaElement) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\""
- "autocomplete=\"off\" />"
- " <TEXTAREA id=\"street-address\">"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <INPUT type='text' id='email' value='john@example.com'"
+ "autocomplete='off' />"
+ " <TEXTAREA id='street-address'>"
"123 Fantasy Ln.&#10;"
"Apt. 42"
"</TEXTAREA>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -1596,27 +1596,27 @@ TEST_F(FormAutofillTest, PreviewForm) {
TEST_F(FormAutofillTest, Labels) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <LABEL for=\"firstname\"> First name: </LABEL>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <LABEL for=\"lastname\"> Last name: </LABEL>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <LABEL for=\"email\"> Email: </LABEL>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <LABEL for='firstname'> First name: </LABEL>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <LABEL for='lastname'> Last name: </LABEL>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <LABEL for='email'> Email: </LABEL>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsWithSpans) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <LABEL for=\"firstname\"><span>First name: </span></LABEL>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <LABEL for=\"lastname\"><span>Last name: </span></LABEL>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <LABEL for=\"email\"><span>Email: </span></LABEL>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <LABEL for='firstname'><span>First name: </span></LABEL>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <LABEL for='lastname'><span>Last name: </span></LABEL>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <LABEL for='email'><span>Email: </span></LABEL>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
@@ -1628,14 +1628,14 @@ TEST_F(FormAutofillTest, LabelsWithSpans) {
// label element and apply it to the following input field.
TEST_F(FormAutofillTest, InvalidLabels) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <LABEL for=\"firstname\"> First name: </LABEL>"
- " <INPUT type=\"text\" name=\"firstname\" value=\"John\"/>"
- " <LABEL for=\"lastname\"> Last name: </LABEL>"
- " <INPUT type=\"text\" name=\"lastname\" value=\"Smith\"/>"
- " <LABEL for=\"email\"> Email: </LABEL>"
- " <INPUT type=\"text\" name=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <LABEL for='firstname'> First name: </LABEL>"
+ " <INPUT type='text' name='firstname' value='John'/>"
+ " <LABEL for='lastname'> Last name: </LABEL>"
+ " <INPUT type='text' name='lastname' value='Smith'/>"
+ " <LABEL for='email'> Email: </LABEL>"
+ " <INPUT type='text' name='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
@@ -1643,90 +1643,90 @@ TEST_F(FormAutofillTest, InvalidLabels) {
// element associated with it.
TEST_F(FormAutofillTest, OneLabelElement) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
" First name:"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <LABEL for=\"lastname\">Last name: </LABEL>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <LABEL for='lastname'>Last name: </LABEL>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" Email:"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromText) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
" First name:"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" Last name:"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" Email:"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromParagraph) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <P>First name:</P><INPUT type=\"text\" "
- " id=\"firstname\" value=\"John\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <P>First name:</P><INPUT type='text' "
+ " id='firstname' value='John'/>"
" <P>Last name:</P>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" <P>Email:</P>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromBold) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <B>First name:</B><INPUT type=\"text\" "
- " id=\"firstname\" value=\"John\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <B>First name:</B><INPUT type='text' "
+ " id='firstname' value='John'/>"
" <B>Last name:</B>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" <B>Email:</B>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredPriorToImgOrBr) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " First name:<IMG/><INPUT type=\"text\" "
- " id=\"firstname\" value=\"John\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " First name:<IMG/><INPUT type='text' "
+ " id='firstname' value='John'/>"
" Last name:<IMG/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" Email:<BR/>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromTableCell) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>First name:</TD>"
- " <TD><INPUT type=\"text\" id=\"firstname\" value=\"John\"/></TD>"
+ " <TD><INPUT type='text' id='firstname' value='John'/></TD>"
" </TR>"
" <TR>"
" <TD>Last name:</TD>"
- " <TD><INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/></TD>"
+ " <TD><INPUT type='text' id='lastname' value='Smith'/></TD>"
" </TR>"
" <TR>"
" <TD>Email:</TD>"
- " <TD><INPUT type=\"text\" id=\"email\""
- " value=\"john@example.com\"/></TD>"
+ " <TD><INPUT type='text' id='email'"
+ " value='john@example.com'/></TD>"
" </TR>"
" <TR>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -1735,25 +1735,25 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCell) {
TEST_F(FormAutofillTest, LabelsInferredFromTableCellTH) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TH>First name:</TH>"
- " <TD><INPUT type=\"text\" id=\"firstname\" value=\"John\"/></TD>"
+ " <TD><INPUT type='text' id='firstname' value='John'/></TD>"
" </TR>"
" <TR>"
" <TH>Last name:</TH>"
- " <TD><INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/></TD>"
+ " <TD><INPUT type='text' id='lastname' value='Smith'/></TD>"
" </TR>"
" <TR>"
" <TH>Email:</TH>"
- " <TD><INPUT type=\"text\" id=\"email\""
- " value=\"john@example.com\"/></TD>"
+ " <TD><INPUT type='text' id='email'"
+ " value='john@example.com'/></TD>"
" </TR>"
" <TR>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -1776,7 +1776,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCellNested) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>"
@@ -1789,7 +1789,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCellNested) {
" </TD>"
" <TD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </FONT>"
" </TD>"
" </TR>"
@@ -1801,7 +1801,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCellNested) {
" </TD>"
" <TD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </FONT>"
" </TD>"
" </TR>"
@@ -1813,14 +1813,14 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableCellNested) {
" </TD>"
" <TD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </FONT>"
" </TD>"
" </TR>"
" <TR>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -1844,7 +1844,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableEmptyTDs) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>"
@@ -1853,7 +1853,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableEmptyTDs) {
" </TD>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -1863,7 +1863,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableEmptyTDs) {
" </TD>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -1873,13 +1873,13 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableEmptyTDs) {
" </TD>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -1903,32 +1903,32 @@ TEST_F(FormAutofillTest, LabelsInferredFromPreviousTD) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>* First Name</TD>"
" <TD>"
" Bogus"
- " <INPUT type=\"hidden\"/>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='hidden'/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>* Last Name</TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>* Email</TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -1969,7 +1969,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
control_types.push_back("text");
ExpectLabelsAndTypes(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>"
@@ -1979,7 +1979,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
" <TD>"
" <SCRIPT> <!-- function test() { alert('ignored as label'); } -->"
" </SCRIPT>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -1991,7 +1991,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
" <NOSCRIPT>"
" <P>Bad</P>"
" </NOSCRIPT>"
- " <INPUT type=\"text\" id=\"middlename\" value=\"Joe\"/>"
+ " <INPUT type='text' id='middlename' value='Joe'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -2000,7 +2000,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
" <B>Last Name</B>"
" </TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -2009,10 +2009,10 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
" <B>Country</B>"
" </TD>"
" <TD>"
- " <SELECT id=\"country\">"
- " <OPTION VALUE=\"US\">The value should be ignored as label."
+ " <SELECT id='country'>"
+ " <OPTION VALUE='US'>The value should be ignored as label."
" </OPTION>"
- " <OPTION VALUE=\"JP\">JAPAN</OPTION>"
+ " <OPTION VALUE='JP'>JAPAN</OPTION>"
" </SELECT>"
" </TD>"
" </TR>"
@@ -2023,13 +2023,13 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
" </TD>"
" <TD>"
" <!-- This comment should be ignored as inferred label.-->"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD></TD>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -2039,58 +2039,58 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableWithSpecialElements) {
TEST_F(FormAutofillTest, LabelsInferredFromTableLabels) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>"
" <LABEL>First name:</LABEL>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>"
" <LABEL>Last name:</LABEL>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>"
" <LABEL>Email:</LABEL>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
"</TABLE>"
- "<INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromTableTDInterveningElements) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>"
" First name:"
" <BR>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>"
" Last name:"
" <BR>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>"
" Email:"
" <BR>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
"</TABLE>"
- "<INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
}
@@ -2112,14 +2112,14 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableAdjacentElements) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>"
" <SPAN>*</SPAN><B>First Name</B>"
" </TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -2127,7 +2127,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableAdjacentElements) {
" <SPAN>*</SPAN><B>Last Name</B>"
" </TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" </TR>"
" <TR>"
@@ -2135,12 +2135,12 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableAdjacentElements) {
" <SPAN>*</SPAN><B>Email</B>"
" </TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>"
@@ -2166,7 +2166,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableRow) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<TABLE>"
" <TR>"
" <TD>*First Name</TD>"
@@ -2175,18 +2175,18 @@ TEST_F(FormAutofillTest, LabelsInferredFromTableRow) {
" </TR>"
" <TR>"
" <TD>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </TD>"
" <TD>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </TD>"
" </TR>"
" <TR>"
" <TD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </TD>"
" </TR>"
"</TABLE>",
@@ -2210,19 +2210,19 @@ TEST_F(FormAutofillTest, LabelsInferredFromListItem) {
values.push_back(ASCIIToUTF16("1212"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<DIV>"
" <LI>"
" <SPAN>Bogus</SPAN>"
" </LI>"
" <LI>"
" <LABEL><EM>*</EM> Home Phone</LABEL>"
- " <INPUT type=\"text\" id=\"areacode\" value=\"415\"/>"
- " <INPUT type=\"text\" id=\"prefix\" value=\"555\"/>"
- " <INPUT type=\"text\" id=\"suffix\" value=\"1212\"/>"
+ " <INPUT type='text' id='areacode' value='415'/>"
+ " <INPUT type='text' id='prefix' value='555'/>"
+ " <INPUT type='text' id='suffix' value='1212'/>"
" </LI>"
" <LI>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </LI>"
"</DIV>"
"</FORM>",
@@ -2245,7 +2245,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionList) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<DL>"
" <DT>"
" <SPAN>"
@@ -2260,7 +2260,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionList) {
" </DT>"
" <DD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </FONT>"
" </DD>"
" <DT>"
@@ -2270,7 +2270,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionList) {
" </DT>"
" <DD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </FONT>"
" </DD>"
" <DT>"
@@ -2280,12 +2280,12 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionList) {
" </DT>"
" <DD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </FONT>"
" </DD>"
" <DT></DT>"
" <DD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </DD>"
"</DL>"
"</FORM>",
@@ -2308,14 +2308,14 @@ TEST_F(FormAutofillTest, LabelsInferredWithSameName) {
values.push_back(base::string16());
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
" Address Line 1:"
- " <INPUT type=\"text\" name=\"Address\"/>"
+ " <INPUT type='text' name='Address'/>"
" Address Line 2:"
- " <INPUT type=\"text\" name=\"Address\"/>"
+ " <INPUT type='text' name='Address'/>"
" Address Line 3:"
- " <INPUT type=\"text\" name=\"Address\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='text' name='Address'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>",
labels, names, values);
}
@@ -2344,75 +2344,75 @@ TEST_F(FormAutofillTest, LabelsInferredWithImageTags) {
values.push_back(base::string16());
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
" Phone:"
- " <input type=\"text\" name=\"dayphone1\">"
+ " <input type='text' name='dayphone1'>"
" <img/>"
" -"
" <img/>"
- " <input type=\"text\" name=\"dayphone2\">"
+ " <input type='text' name='dayphone2'>"
" <img/>"
" -"
" <img/>"
- " <input type=\"text\" name=\"dayphone3\">"
+ " <input type='text' name='dayphone3'>"
" ext.:"
- " <input type=\"text\" name=\"dayphone4\">"
- " <input type=\"text\" name=\"dummy\">"
- " <input type=\"submit\" name=\"reply-send\" value=\"Send\">"
+ " <input type='text' name='dayphone4'>"
+ " <input type='text' name='dummy'>"
+ " <input type='submit' name='reply-send' value='Send'>"
"</FORM>",
labels, names, values);
}
TEST_F(FormAutofillTest, LabelsInferredFromDivTable) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<DIV>First name:<BR>"
" <SPAN>"
- " <INPUT type=\"text\" name=\"firstname\" value=\"John\">"
+ " <INPUT type='text' name='firstname' value='John'>"
" </SPAN>"
"</DIV>"
"<DIV>Last name:<BR>"
" <SPAN>"
- " <INPUT type=\"text\" name=\"lastname\" value=\"Smith\">"
+ " <INPUT type='text' name='lastname' value='Smith'>"
" </SPAN>"
"</DIV>"
"<DIV>Email:<BR>"
" <SPAN>"
- " <INPUT type=\"text\" name=\"email\" value=\"john@example.com\">"
+ " <INPUT type='text' name='email' value='john@example.com'>"
" </SPAN>"
"</DIV>"
- "<input type=\"submit\" name=\"reply-send\" value=\"Send\">"
+ "<input type='submit' name='reply-send' value='Send'>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromDivSiblingTable) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<DIV>First name:</DIV>"
"<DIV>"
" <SPAN>"
- " <INPUT type=\"text\" name=\"firstname\" value=\"John\">"
+ " <INPUT type='text' name='firstname' value='John'>"
" </SPAN>"
"</DIV>"
"<DIV>Last name:</DIV>"
"<DIV>"
" <SPAN>"
- " <INPUT type=\"text\" name=\"lastname\" value=\"Smith\">"
+ " <INPUT type='text' name='lastname' value='Smith'>"
" </SPAN>"
"</DIV>"
"<DIV>Email:</DIV>"
"<DIV>"
" <SPAN>"
- " <INPUT type=\"text\" name=\"email\" value=\"john@example.com\">"
+ " <INPUT type='text' name='email' value='john@example.com'>"
" </SPAN>"
"</DIV>"
- "<input type=\"submit\" name=\"reply-send\" value=\"Send\">"
+ "<input type='submit' name='reply-send' value='Send'>"
"</FORM>");
}
TEST_F(FormAutofillTest, LabelsInferredFromDefinitionListRatherThanDivTable) {
ExpectJohnSmithLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
"<DIV>This is not a label.<BR>"
"<DL>"
" <DT>"
@@ -2422,7 +2422,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionListRatherThanDivTable) {
" </DT>"
" <DD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
+ " <INPUT type='text' id='firstname' value='John'/>"
" </FONT>"
" </DD>"
" <DT>"
@@ -2432,7 +2432,7 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionListRatherThanDivTable) {
" </DT>"
" <DD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
" </FONT>"
" </DD>"
" <DT>"
@@ -2442,12 +2442,12 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionListRatherThanDivTable) {
" </DT>"
" <DD>"
" <FONT>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
" </FONT>"
" </DD>"
" <DT></DT>"
" <DD>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
" </DD>"
"</DL>"
"</DIV>"
@@ -2455,11 +2455,11 @@ TEST_F(FormAutofillTest, LabelsInferredFromDefinitionListRatherThanDivTable) {
}
TEST_F(FormAutofillTest, FillFormMaxLength) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" maxlength=\"5\"/>"
- " <INPUT type=\"text\" id=\"lastname\" maxlength=\"7\"/>"
- " <INPUT type=\"text\" id=\"email\" maxlength=\"9\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' maxlength='5'/>"
+ " <INPUT type='text' id='lastname' maxlength='7'/>"
+ " <INPUT type='text' id='email' maxlength='9'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -2555,11 +2555,11 @@ TEST_F(FormAutofillTest, FillFormMaxLength) {
// In this case, the maxlength of the input elements is set to the default
// maxlength (defined in WebKit.)
TEST_F(FormAutofillTest, FillFormNegativeMaxLength) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" maxlength=\"-1\"/>"
- " <INPUT type=\"text\" id=\"lastname\" maxlength=\"-10\"/>"
- " <INPUT type=\"text\" id=\"email\" maxlength=\"-13\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' maxlength='-1'/>"
+ " <INPUT type='text' id='lastname' maxlength='-10'/>"
+ " <INPUT type='text' id='email' maxlength='-13'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -2636,11 +2636,11 @@ TEST_F(FormAutofillTest, FillFormNegativeMaxLength) {
}
TEST_F(FormAutofillTest, FillFormEmptyName) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"text\" id=\"email\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='text' id='email'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -2720,17 +2720,17 @@ TEST_F(FormAutofillTest, FillFormEmptyName) {
}
TEST_F(FormAutofillTest, FillFormEmptyFormNames) {
- LoadHTML("<FORM action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\"/>"
- " <INPUT type=\"text\" id=\"middlename\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname'/>"
+ " <INPUT type='text' id='middlename'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>"
- "<FORM action=\"http://abc.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"apple\"/>"
- " <INPUT type=\"text\" id=\"banana\"/>"
- " <INPUT type=\"text\" id=\"cantelope\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ "<FORM action='http://abc.com' method='post'>"
+ " <INPUT type='text' id='apple'/>"
+ " <INPUT type='text' id='banana'/>"
+ " <INPUT type='text' id='cantelope'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -2816,16 +2816,16 @@ TEST_F(FormAutofillTest, FillFormEmptyFormNames) {
}
TEST_F(FormAutofillTest, ThreePartPhone) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
" Phone:"
- " <input type=\"text\" name=\"dayphone1\">"
+ " <input type='text' name='dayphone1'>"
" -"
- " <input type=\"text\" name=\"dayphone2\">"
+ " <input type='text' name='dayphone2'>"
" -"
- " <input type=\"text\" name=\"dayphone3\">"
+ " <input type='text' name='dayphone3'>"
" ext.:"
- " <input type=\"text\" name=\"dayphone4\">"
- " <input type=\"submit\" name=\"reply-send\" value=\"Send\">"
+ " <input type='text' name='dayphone4'>"
+ " <input type='submit' name='reply-send' value='Send'>"
"</FORM>");
@@ -2873,19 +2873,19 @@ TEST_F(FormAutofillTest, ThreePartPhone) {
TEST_F(FormAutofillTest, MaxLengthFields) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
" Phone:"
- " <input type=\"text\" maxlength=\"3\" name=\"dayphone1\">"
+ " <input type='text' maxlength='3' name='dayphone1'>"
" -"
- " <input type=\"text\" maxlength=\"3\" name=\"dayphone2\">"
+ " <input type='text' maxlength='3' name='dayphone2'>"
" -"
- " <input type=\"text\" maxlength=\"4\" size=\"5\""
- " name=\"dayphone3\">"
+ " <input type='text' maxlength='4' size='5'"
+ " name='dayphone3'>"
" ext.:"
- " <input type=\"text\" maxlength=\"5\" name=\"dayphone4\">"
- " <input type=\"text\" name=\"default1\">"
- " <input type=\"text\" maxlength=\"-1\" name=\"invalid1\">"
- " <input type=\"submit\" name=\"reply-send\" value=\"Send\">"
+ " <input type='text' maxlength='5' name='dayphone4'>"
+ " <input type='text' name='default1'>"
+ " <input type='text' maxlength='-1' name='invalid1'>"
+ " <input type='submit' name='reply-send' value='Send'>"
"</FORM>");
WebFrame* frame = GetMainFrame();
@@ -2949,11 +2949,11 @@ TEST_F(FormAutofillTest, MaxLengthFields) {
// profile from the Autofill suggestions popup. The field that is being typed
// into should be filled even though it's not technically empty.
TEST_F(FormAutofillTest, FillFormNonEmptyField) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"text\" id=\"email\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='text' id='email'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3055,20 +3055,20 @@ TEST_F(FormAutofillTest, FillFormNonEmptyField) {
TEST_F(FormAutofillTest, ClearFormWithNode) {
LoadHTML(
- "<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"Wyatt\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Earp\"/>"
- " <INPUT type=\"text\" autocomplete=\"off\" id=\"noAC\" value=\"one\"/>"
- " <INPUT type=\"text\" id=\"notenabled\" disabled=\"disabled\">"
- " <INPUT type=\"month\" id=\"month\" value=\"2012-11\">"
- " <INPUT type=\"month\" id=\"month-disabled\" value=\"2012-11\""
- " disabled=\"disabled\">"
- " <TEXTAREA id=\"textarea\">Apple.</TEXTAREA>"
- " <TEXTAREA id=\"textarea-disabled\" disabled=\"disabled\">"
+ "<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='Wyatt'/>"
+ " <INPUT type='text' id='lastname' value='Earp'/>"
+ " <INPUT type='text' autocomplete='off' id='noAC' value='one'/>"
+ " <INPUT type='text' id='notenabled' disabled='disabled'>"
+ " <INPUT type='month' id='month' value='2012-11'>"
+ " <INPUT type='month' id='month-disabled' value='2012-11'"
+ " disabled='disabled'>"
+ " <TEXTAREA id='textarea'>Apple.</TEXTAREA>"
+ " <TEXTAREA id='textarea-disabled' disabled='disabled'>"
" Banana!"
" </TEXTAREA>"
- " <TEXTAREA id=\"textarea-noAC\" autocomplete=\"off\">Carrot?</TEXTAREA>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ " <TEXTAREA id='textarea-noAC' autocomplete='off'>Carrot?</TEXTAREA>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3172,16 +3172,16 @@ TEST_F(FormAutofillTest, ClearFormWithNode) {
TEST_F(FormAutofillTest, ClearFormWithNodeContainingSelectOne) {
LoadHTML(
- "<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"Wyatt\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Earp\"/>"
- " <SELECT id=\"state\" name=\"state\">"
+ "<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='Wyatt'/>"
+ " <INPUT type='text' id='lastname' value='Earp'/>"
+ " <SELECT id='state' name='state'>"
" <OPTION selected>?</OPTION>"
" <OPTION>AA</OPTION>"
" <OPTION>AE</OPTION>"
" <OPTION>AK</OPTION>"
" </SELECT>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3254,13 +3254,13 @@ TEST_F(FormAutofillTest, ClearFormWithNodeContainingSelectOne) {
}
TEST_F(FormAutofillTest, ClearPreviewedFormWithElement) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"Wyatt\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"text\" id=\"email\"/>"
- " <INPUT type=\"email\" id=\"email2\"/>"
- " <INPUT type=\"tel\" id=\"phone\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='Wyatt'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='text' id='email'/>"
+ " <INPUT type='email' id='email2'/>"
+ " <INPUT type='tel' id='phone'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3322,13 +3322,13 @@ TEST_F(FormAutofillTest, ClearPreviewedFormWithElement) {
}
TEST_F(FormAutofillTest, ClearPreviewedFormWithNonEmptyInitiatingNode) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"W\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"text\" id=\"email\"/>"
- " <INPUT type=\"email\" id=\"email2\"/>"
- " <INPUT type=\"tel\" id=\"phone\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='W'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='text' id='email'/>"
+ " <INPUT type='email' id='email2'/>"
+ " <INPUT type='tel' id='phone'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3390,13 +3390,13 @@ TEST_F(FormAutofillTest, ClearPreviewedFormWithNonEmptyInitiatingNode) {
}
TEST_F(FormAutofillTest, ClearPreviewedFormWithAutofilledInitiatingNode) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"W\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"text\" id=\"email\"/>"
- " <INPUT type=\"email\" id=\"email2\"/>"
- " <INPUT type=\"tel\" id=\"phone\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='W'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='text' id='email'/>"
+ " <INPUT type='email' id='email2'/>"
+ " <INPUT type='tel' id='phone'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3460,12 +3460,12 @@ TEST_F(FormAutofillTest, ClearPreviewedFormWithAutofilledInitiatingNode) {
TEST_F(FormAutofillTest, ClearOnlyAutofilledFields) {
// Load the form.
LoadHTML(
- "<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"Wyatt\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Earp\"/>"
- " <INPUT type=\"email\" id=\"email\" value=\"wyatt@earp.com\"/>"
- " <INPUT type=\"tel\" id=\"phone\" value=\"650-777-9999\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ "<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='Wyatt'/>"
+ " <INPUT type='text' id='lastname' value='Earp'/>"
+ " <INPUT type='email' id='email' value='wyatt@earp.com'/>"
+ " <INPUT type='tel' id='phone' value='650-777-9999'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3509,13 +3509,13 @@ TEST_F(FormAutofillTest, ClearOnlyAutofilledFields) {
}
TEST_F(FormAutofillTest, FormWithNodeIsAutofilled) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://buh.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"Wyatt\"/>"
- " <INPUT type=\"text\" id=\"lastname\"/>"
- " <INPUT type=\"text\" id=\"email\"/>"
- " <INPUT type=\"email\" id=\"email2\"/>"
- " <INPUT type=\"tel\" id=\"phone\"/>"
- " <INPUT type=\"submit\" value=\"Send\"/>"
+ LoadHTML("<FORM name='TestForm' action='http://buh.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='Wyatt'/>"
+ " <INPUT type='text' id='lastname'/>"
+ " <INPUT type='text' id='email'/>"
+ " <INPUT type='email' id='email2'/>"
+ " <INPUT type='tel' id='phone'/>"
+ " <INPUT type='submit' value='Send'/>"
"</FORM>");
WebFrame* web_frame = GetMainFrame();
@@ -3555,24 +3555,24 @@ TEST_F(FormAutofillTest, MultipleLabelsPerElement) {
values.push_back(ASCIIToUTF16("john@example.com"));
ExpectLabels(
- "<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <LABEL for=\"firstname\"> First Name: </LABEL>"
- " <LABEL for=\"firstname\"></LABEL>"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <LABEL for=\"lastname\"></LABEL>"
- " <LABEL for=\"lastname\"> Last Name: </LABEL>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <LABEL for=\"email\"> Email: </LABEL>"
- " <LABEL for=\"email\"> xxx@yyy.com </LABEL>"
- " <INPUT type=\"text\" id=\"email\" value=\"john@example.com\"/>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ "<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <LABEL for='firstname'> First Name: </LABEL>"
+ " <LABEL for='firstname'></LABEL>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <LABEL for='lastname'></LABEL>"
+ " <LABEL for='lastname'> Last Name: </LABEL>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <LABEL for='email'> Email: </LABEL>"
+ " <LABEL for='email'> xxx@yyy.com </LABEL>"
+ " <INPUT type='text' id='email' value='john@example.com'/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>",
labels, names, values);
}
TEST_F(FormAutofillTest, ClickElement) {
- LoadHTML("<BUTTON id=\"link\">Button</BUTTON>"
- "<BUTTON name=\"button\">Button</BUTTON>");
+ LoadHTML("<BUTTON id='link'>Button</BUTTON>"
+ "<BUTTON name='button'>Button</BUTTON>");
WebFrame* frame = GetMainFrame();
ASSERT_NE(static_cast<WebFrame*>(NULL), frame);
@@ -3584,7 +3584,7 @@ TEST_F(FormAutofillTest, ClickElement) {
// Successful retrieval by css selector.
clicker.retrieval_method = autofill::WebElementDescriptor::CSS_SELECTOR;
- clicker.descriptor = "button[name=\"button\"]";
+ clicker.descriptor = "button[name='button']";
EXPECT_TRUE(ClickElement(frame->document(), clicker));
// Unsuccessful retrieval due to invalid CSS selector.
@@ -3597,15 +3597,15 @@ TEST_F(FormAutofillTest, ClickElement) {
}
TEST_F(FormAutofillTest, SelectOneAsText) {
- LoadHTML("<FORM name=\"TestForm\" action=\"http://cnn.com\" method=\"post\">"
- " <INPUT type=\"text\" id=\"firstname\" value=\"John\"/>"
- " <INPUT type=\"text\" id=\"lastname\" value=\"Smith\"/>"
- " <SELECT id=\"country\">"
- " <OPTION value=\"AF\">Afghanistan</OPTION>"
- " <OPTION value=\"AL\">Albania</OPTION>"
- " <OPTION value=\"DZ\">Algeria</OPTION>"
+ LoadHTML("<FORM name='TestForm' action='http://cnn.com' method='post'>"
+ " <INPUT type='text' id='firstname' value='John'/>"
+ " <INPUT type='text' id='lastname' value='Smith'/>"
+ " <SELECT id='country'>"
+ " <OPTION value='AF'>Afghanistan</OPTION>"
+ " <OPTION value='AL'>Albania</OPTION>"
+ " <OPTION value='DZ'>Algeria</OPTION>"
" </SELECT>"
- " <INPUT type=\"submit\" name=\"reply-send\" value=\"Send\"/>"
+ " <INPUT type='submit' name='reply-send' value='Send'/>"
"</FORM>");
WebFrame* frame = GetMainFrame();
« no previous file with comments | « chrome/renderer/autofill/autofill_renderer_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698