Chromium Code Reviews| 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 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3031 expected.max_length = WebInputElement::defaultMaxLength(); | 3031 expected.max_length = WebInputElement::defaultMaxLength(); |
| 3032 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); | 3032 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[1]); |
| 3033 | 3033 |
| 3034 expected.name = ASCIIToUTF16("country"); | 3034 expected.name = ASCIIToUTF16("country"); |
| 3035 expected.value = ASCIIToUTF16("AL"); | 3035 expected.value = ASCIIToUTF16("AL"); |
| 3036 expected.form_control_type = "select-one"; | 3036 expected.form_control_type = "select-one"; |
| 3037 expected.max_length = 0; | 3037 expected.max_length = 0; |
| 3038 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); | 3038 EXPECT_FORM_FIELD_DATA_EQUALS(expected, fields[2]); |
| 3039 } | 3039 } |
| 3040 | 3040 |
| 3041 TEST_F(FormAutofillTest, ExtractHostNameFromUrlTest) { | |
|
vabr (Chromium)
2013/08/14 14:39:58
The tested function has been removed, right? If so
jdomingos
2013/08/27 18:04:15
Done.
| |
| 3042 EXPECT_EQ(ExtractHostNameFromUrl("www.example.com"), "example"); | |
| 3043 EXPECT_EQ(ExtractHostNameFromUrl("test"), ""); | |
| 3044 EXPECT_EQ(ExtractHostNameFromUrl(".."), ""); | |
| 3045 EXPECT_EQ(ExtractHostNameFromUrl("test..com"), ""); | |
| 3046 EXPECT_EQ(ExtractHostNameFromUrl(""), ""); | |
| 3047 EXPECT_EQ(ExtractHostNameFromUrl("."), ""); | |
| 3048 } | |
| 3049 | |
| 3041 } // namespace autofill | 3050 } // namespace autofill |
| OLD | NEW |