Index: chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
index 7a3367bf254f918abef483cc68eebc8ff50f421d..4b1802481419de5c700af551bc451b6efcbbc6e1 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/autofill/AutofillPopupTest.java |
@@ -51,69 +51,69 @@ public class AutofillPopupTest extends ChromeShellTestBase { |
private static final String LANGUAGE_CODE = ""; |
private static final String ORIGIN = "https://www.example.com"; |
- private static final String BASIC_PAGE_DATA = UrlUtils.encodeHtmlDataUri( |
- "<html><head><meta name=\"viewport\"" + |
- "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" + |
- "<body><form method=\"POST\">" + |
- "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\" /><br>" + |
- "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\" /><br>" + |
- "<textarea id=\"sa\" autocomplete=\"street-address\"></textarea><br>" + |
- "<input type=\"text\" id=\"a1\" autocomplete=\"address-line1\" /><br>" + |
- "<input type=\"text\" id=\"a2\" autocomplete=\"address-line2\" /><br>" + |
- "<input type=\"text\" id=\"ct\" autocomplete=\"locality\" /><br>" + |
- "<input type=\"text\" id=\"zc\" autocomplete=\"postal-code\" /><br>" + |
- "<input type=\"text\" id=\"em\" autocomplete=\"email\" /><br>" + |
- "<input type=\"text\" id=\"ph\" autocomplete=\"tel\" /><br>" + |
- "<input type=\"text\" id=\"fx\" autocomplete=\"fax\" /><br>" + |
- "<select id=\"co\" autocomplete=\"country\"><br>" + |
- "<option value=\"BR\">Brazil</option>" + |
- "<option value=\"US\">United States</option>" + |
- "</select>" + |
- "<input type=\"submit\" />" + |
- "</form></body></html>"); |
- |
- private static final String INITIATING_ELEMENT_FILLED = UrlUtils.encodeHtmlDataUri( |
- "<html><head><meta name=\"viewport\"" + |
- "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" + |
- "<body><form method=\"POST\">" + |
- "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\" value=\"J\"><br>" + |
- "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\"><br>" + |
- "<input type=\"text\" id=\"em\" autocomplete=\"email\"><br>" + |
- "<select id=\"co\" autocomplete=\"country\"><br>" + |
- "<option value=\"US\">United States</option>" + |
- "<option value=\"BR\">Brazil</option>" + |
- "</select>" + |
- "<input type=\"submit\" />" + |
- "</form></body></html>"); |
- |
- private static final String ANOTHER_ELEMENT_FILLED = UrlUtils.encodeHtmlDataUri( |
- "<html><head><meta name=\"viewport\"" + |
- "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" + |
- "<body><form method=\"POST\">" + |
- "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\"><br>" + |
- "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\"><br>" + |
- "<input type=\"text\" id=\"em\" autocomplete=\"email\" value=\"foo@example.com\"><br>" + |
- "<select id=\"co\" autocomplete=\"country\"><br>" + |
- "<option></option>" + |
- "<option value=\"BR\">Brazil</option>" + |
- "<option value=\"US\">United States</option>" + |
- "</select>" + |
- "<input type=\"submit\" />" + |
- "</form></body></html>"); |
- |
- private static final String INVALID_OPTION = UrlUtils.encodeHtmlDataUri( |
- "<html><head><meta name=\"viewport\"" + |
- "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" + |
- "<body><form method=\"POST\">" + |
- "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\" value=\"J\"><br>" + |
- "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\"><br>" + |
- "<input type=\"text\" id=\"em\" autocomplete=\"email\"><br>" + |
- "<select id=\"co\" autocomplete=\"country\"><br>" + |
- "<option value=\"GB\">Great Britain</option>" + |
- "<option value=\"BR\">Brazil</option>" + |
- "</select>" + |
- "<input type=\"submit\" />" + |
- "</form></body></html>"); |
+ private static final String BASIC_PAGE_DATA = UrlUtils.encodeHtmlDataUri("<html><head>" |
+ + "<meta name=\"viewport\"" |
+ + "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" |
+ + "<body><form method=\"POST\">" |
+ + "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\" /><br>" |
+ + "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\" /><br>" |
+ + "<textarea id=\"sa\" autocomplete=\"street-address\"></textarea><br>" |
+ + "<input type=\"text\" id=\"a1\" autocomplete=\"address-line1\" /><br>" |
+ + "<input type=\"text\" id=\"a2\" autocomplete=\"address-line2\" /><br>" |
+ + "<input type=\"text\" id=\"ct\" autocomplete=\"locality\" /><br>" |
+ + "<input type=\"text\" id=\"zc\" autocomplete=\"postal-code\" /><br>" |
+ + "<input type=\"text\" id=\"em\" autocomplete=\"email\" /><br>" |
+ + "<input type=\"text\" id=\"ph\" autocomplete=\"tel\" /><br>" |
+ + "<input type=\"text\" id=\"fx\" autocomplete=\"fax\" /><br>" |
+ + "<select id=\"co\" autocomplete=\"country\"><br>" |
+ + "<option value=\"BR\">Brazil</option>" |
+ + "<option value=\"US\">United States</option>" |
+ + "</select>" |
+ + "<input type=\"submit\" />" |
+ + "</form></body></html>"); |
+ |
+ private static final String INITIATING_ELEMENT_FILLED = UrlUtils.encodeHtmlDataUri("<html>" |
+ + "<head><meta name=\"viewport\"" |
+ + "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" |
+ + "<body><form method=\"POST\">" |
+ + "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\" value=\"J\"><br>" |
+ + "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\"><br>" |
+ + "<input type=\"text\" id=\"em\" autocomplete=\"email\"><br>" |
+ + "<select id=\"co\" autocomplete=\"country\"><br>" |
+ + "<option value=\"US\">United States</option>" |
+ + "<option value=\"BR\">Brazil</option>" |
+ + "</select>" |
+ + "<input type=\"submit\" />" |
+ + "</form></body></html>"); |
+ |
+ private static final String ANOTHER_ELEMENT_FILLED = UrlUtils.encodeHtmlDataUri("<html><head>" |
+ + "<meta name=\"viewport\"" |
+ + "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" |
+ + "<body><form method=\"POST\">" |
+ + "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\"><br>" |
+ + "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\"><br>" |
+ + "<input type=\"text\" id=\"em\" autocomplete=\"email\" value=\"foo@example.com\"><br>" |
+ + "<select id=\"co\" autocomplete=\"country\"><br>" |
+ + "<option></option>" |
+ + "<option value=\"BR\">Brazil</option>" |
+ + "<option value=\"US\">United States</option>" |
+ + "</select>" |
+ + "<input type=\"submit\" />" |
+ + "</form></body></html>"); |
+ |
+ private static final String INVALID_OPTION = UrlUtils.encodeHtmlDataUri("<html><head>" |
+ + "<meta name=\"viewport\"" |
+ + "content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0\" /></head>" |
+ + "<body><form method=\"POST\">" |
+ + "<input type=\"text\" id=\"fn\" autocomplete=\"given-name\" value=\"J\"><br>" |
+ + "<input type=\"text\" id=\"ln\" autocomplete=\"family-name\"><br>" |
+ + "<input type=\"text\" id=\"em\" autocomplete=\"email\"><br>" |
+ + "<select id=\"co\" autocomplete=\"country\"><br>" |
+ + "<option value=\"GB\">Great Britain</option>" |
+ + "<option value=\"BR\">Brazil</option>" |
+ + "</select>" |
+ + "<input type=\"submit\" />" |
+ + "</form></body></html>"); |
private AutofillTestHelper mHelper; |
private List<AutofillLogger.LogEntry> mAutofillLoggedEntries; |
@@ -344,8 +344,8 @@ public class AutofillPopupTest extends ChromeShellTestBase { |
private void assertLogged(String autofilledValue, String profileFullName) { |
for (AutofillLogger.LogEntry entry : mAutofillLoggedEntries) { |
- if (entry.getAutofilledValue().equals(autofilledValue) && |
- entry.getProfileFullName().equals(profileFullName)) { |
+ if (entry.getAutofilledValue().equals(autofilledValue) |
+ && entry.getProfileFullName().equals(profileFullName)) { |
return; |
} |
} |