Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Unified Diff: components/password_manager/core/browser/password_ui_utils_unittest.cc

Issue 2042033003: Displaying human-readable Android credentials on Android OS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address minor comments Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/password_manager/core/browser/password_ui_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..40f7e1768ccdc732164a5de4ed536166dc60593f 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 char* input;
+ const char* 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
« no previous file with comments | « components/password_manager/core/browser/password_ui_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698