OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <vector> | 5 #include <vector> |
6 | 6 |
7 #include "base/format_macros.h" | 7 #include "base/format_macros.h" |
8 #include "base/metrics/field_trial.h" | 8 #include "base/metrics/field_trial.h" |
9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 " <INPUT type='submit' name='reply-send' value='Send'/>" | 89 " <INPUT type='submit' name='reply-send' value='Send'/>" |
90 "</FORM>"; | 90 "</FORM>"; |
91 | 91 |
92 } // namespace | 92 } // namespace |
93 | 93 |
94 namespace autofill { | 94 namespace autofill { |
95 | 95 |
96 class FormAutofillTest : public ChromeRenderViewTest { | 96 class FormAutofillTest : public ChromeRenderViewTest { |
97 public: | 97 public: |
98 FormAutofillTest() : ChromeRenderViewTest() {} | 98 FormAutofillTest() : ChromeRenderViewTest() {} |
99 virtual ~FormAutofillTest() {} | 99 ~FormAutofillTest() override {} |
100 | 100 |
101 void ExpectLabels(const char* html, | 101 void ExpectLabels(const char* html, |
102 const std::vector<base::string16>& labels, | 102 const std::vector<base::string16>& labels, |
103 const std::vector<base::string16>& names, | 103 const std::vector<base::string16>& names, |
104 const std::vector<base::string16>& values) { | 104 const std::vector<base::string16>& values) { |
105 std::vector<std::string> control_types(labels.size(), "text"); | 105 std::vector<std::string> control_types(labels.size(), "text"); |
106 ExpectLabelsAndTypes(html, labels, names, values, control_types); | 106 ExpectLabelsAndTypes(html, labels, names, values, control_types); |
107 } | 107 } |
108 | 108 |
109 void ExpectLabelsAndTypes(const char* html, | 109 void ExpectLabelsAndTypes(const char* html, |
(...skipping 3569 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3679 expected.max_length = WebInputElement::defaultMaxLength(); | 3679 expected.max_length = WebInputElement::defaultMaxLength(); |
3680 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); | 3680 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); |
3681 | 3681 |
3682 expected.name = ASCIIToUTF16("country"); | 3682 expected.name = ASCIIToUTF16("country"); |
3683 expected.value = ASCIIToUTF16("AL"); | 3683 expected.value = ASCIIToUTF16("AL"); |
3684 expected.form_control_type = "select-one"; | 3684 expected.form_control_type = "select-one"; |
3685 expected.max_length = 0; | 3685 expected.max_length = 0; |
3686 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); | 3686 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); |
3687 } | 3687 } |
3688 } // namespace autofill | 3688 } // namespace autofill |
OLD | NEW |