| Index: components/password_manager/core/browser/password_ui_utils_unittest.cc
|
| diff --git a/components/password_manager/core/browser/password_ui_utils_unittest.cc b/components/password_manager/core/browser/password_ui_utils_unittest.cc
|
| index 780fa8c50e468c9fde8c98658af768d3efbd845c..6d7e0748b8d444ecee8f980dd1513021d81934d0 100644
|
| --- a/components/password_manager/core/browser/password_ui_utils_unittest.cc
|
| +++ b/components/password_manager/core/browser/password_ui_utils_unittest.cc
|
| @@ -93,4 +93,16 @@ TEST(GetShownOriginAndLinkUrlTest, OriginFromNonAndroidForm) {
|
| EXPECT_EQ(form.origin, link_url);
|
| }
|
|
|
| +TEST(SplitByDotAndReverseTest, ReversedHostname) {
|
| + const struct {
|
| + const base::StringPiece input;
|
| + const std::string output;
|
| + } kTestCases[] = {{"com.example.android", "android.example.com"},
|
| + {"com.example.mobile", "mobile.example.com"},
|
| + {"net.example.subdomain", "subdomain.example.net"}};
|
| + for (const auto& test_case : kTestCases) {
|
| + EXPECT_EQ(test_case.output, SplitByDotAndReverse(test_case.input));
|
| + }
|
| +}
|
| +
|
| } // namespace password_manager
|
|
|