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

Unified Diff: chrome/browser/ui/passwords/password_manager_presenter_unittest.cc

Issue 2500393002: [Password Manager] Add the scheme to sort keys for chrome://settings/passwords (Closed)
Patch Set: Changes addressed to reviewer comments Created 4 years, 1 month 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 | « chrome/browser/ui/passwords/password_manager_presenter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/passwords/password_manager_presenter_unittest.cc
diff --git a/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc b/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc
index b8312c81a07b3ccba023dac7f2a9b362433e5357..61e23cdec4d0137fdb447c5b4fc364e5a604a33d 100644
--- a/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc
+++ b/chrome/browser/ui/passwords/password_manager_presenter_unittest.cc
@@ -252,6 +252,15 @@ TEST_F(PasswordManagerPresenterTest, Sorting_DifferentPasswords) {
PasswordEntryType::SAVED);
}
+TEST_F(PasswordManagerPresenterTest, Sorting_DifferentSchemes) {
+ const SortEntry test_cases[] = {
+ {"https://example.com", "user", "1", nullptr, nullptr, 1},
+ {"https://example.com", "user", "1", nullptr, nullptr, -1}, // Hide it.
+ {"http://example.com", "user", "1", nullptr, nullptr, 0}};
+ SortAndCheckPositions(test_cases, arraysize(test_cases),
+ PasswordEntryType::SAVED);
+}
+
TEST_F(PasswordManagerPresenterTest, Sorting_HideDuplicates) {
const SortEntry test_cases[] = {
{"http://example.com", "user_a", "pwd", nullptr, nullptr, 0},
@@ -294,9 +303,9 @@ TEST_F(PasswordManagerPresenterTest, Sorting_PasswordExceptions) {
TEST_F(PasswordManagerPresenterTest, Sorting_AndroidCredentials) {
const SortEntry test_cases[] = {
- {"https://alpha.com", "user", "secret", nullptr, nullptr, 0},
+ {"https://alpha.com", "user", "secret", nullptr, nullptr, 1},
{"android://hash@com.alpha", "user", "secret", "https://alpha.com",
- nullptr, 1},
+ nullptr, 0},
{"android://hash@com.alpha", "user", "secret", "https://alpha.com",
nullptr, -1},
{"android://hash@com.alpha", "user", "secret", nullptr, nullptr, 2},
« no previous file with comments | « chrome/browser/ui/passwords/password_manager_presenter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698