| Index: components/autofill/core/common/autofill_util_unittest.cc
|
| diff --git a/components/autofill/core/common/autofill_util_unittest.cc b/components/autofill/core/common/autofill_util_unittest.cc
|
| index 2115b3ed3ab2d5f985c0e1b1cad6281ba0dbdfd8..60c5010b3166f4bee473a63d577cac0656630da9 100644
|
| --- a/components/autofill/core/common/autofill_util_unittest.cc
|
| +++ b/components/autofill/core/common/autofill_util_unittest.cc
|
| @@ -49,17 +49,17 @@
|
| {"ab", "", true, true},
|
| };
|
|
|
| - for (const auto& test_case : kTestCases) {
|
| + for (size_t i = 0; i < arraysize(kTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message()
|
| - << "suggestion = " << test_case.field_suggestion
|
| - << ", contents = " << test_case.field_contents
|
| - << ", case_sensitive = " << test_case.case_sensitive);
|
| + << "suggestion = " << kTestCases[i].field_suggestion
|
| + << ", contents = " << kTestCases[i].field_contents
|
| + << ", case_sensitive = " << kTestCases[i].case_sensitive);
|
|
|
| - EXPECT_EQ(test_case.expected_result,
|
| + EXPECT_EQ(kTestCases[i].expected_result,
|
| FieldIsSuggestionSubstringStartingOnTokenBoundary(
|
| - base::ASCIIToUTF16(test_case.field_suggestion),
|
| - base::ASCIIToUTF16(test_case.field_contents),
|
| - test_case.case_sensitive));
|
| + base::ASCIIToUTF16(kTestCases[i].field_suggestion),
|
| + base::ASCIIToUTF16(kTestCases[i].field_contents),
|
| + kTestCases[i].case_sensitive));
|
| }
|
| }
|
|
|
| @@ -85,17 +85,17 @@
|
| {"texample@example.com", "example", false, 16},
|
| };
|
|
|
| - for (const auto& test_case : kTestCases) {
|
| + for (size_t i = 0; i < arraysize(kTestCases); ++i) {
|
| SCOPED_TRACE(testing::Message()
|
| - << "suggestion = " << test_case.field_suggestion
|
| - << ", contents = " << test_case.field_contents
|
| - << ", case_sensitive = " << test_case.case_sensitive);
|
| + << "suggestion = " << kTestCases[i].field_suggestion
|
| + << ", contents = " << kTestCases[i].field_contents
|
| + << ", case_sensitive = " << kTestCases[i].case_sensitive);
|
|
|
| - EXPECT_EQ(
|
| - test_case.expected_start,
|
| - GetTextSelectionStart(base::ASCIIToUTF16(test_case.field_suggestion),
|
| - base::ASCIIToUTF16(test_case.field_contents),
|
| - test_case.case_sensitive));
|
| + EXPECT_EQ(kTestCases[i].expected_start,
|
| + GetTextSelectionStart(
|
| + base::ASCIIToUTF16(kTestCases[i].field_suggestion),
|
| + base::ASCIIToUTF16(kTestCases[i].field_contents),
|
| + kTestCases[i].case_sensitive));
|
| }
|
| }
|
|
|
| @@ -120,11 +120,12 @@
|
| {"foO baR bAz", {"foo", "bar", "baz"}},
|
| };
|
|
|
| - for (const auto& test_case : kTestCases) {
|
| - SCOPED_TRACE(testing::Message() << "attribute = " << test_case.attribute);
|
| + for (size_t i = 0; i < arraysize(kTestCases); ++i) {
|
| + SCOPED_TRACE(testing::Message() << "attribute = "
|
| + << kTestCases[i].attribute);
|
|
|
| - EXPECT_EQ(test_case.tokens,
|
| - LowercaseAndTokenizeAttributeString(test_case.attribute));
|
| + EXPECT_EQ(kTestCases[i].tokens,
|
| + LowercaseAndTokenizeAttributeString(kTestCases[i].attribute));
|
| }
|
| }
|
| } // namespace autofill
|
|
|