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

Side by Side Diff: chrome/browser/ui/passwords/manage_passwords_view_utils_unittest.cc

Issue 1787653002: Password update bubble UI improvement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments Created 4 years, 9 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_view_utils.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ui/passwords/manage_passwords_view_utils.h" 5 #include "chrome/browser/ui/passwords/manage_passwords_view_utils.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 PasswordTittleType::SAVE_PASSWORD, "http://example.com", 12, 29}, 55 PasswordTittleType::SAVE_PASSWORD, "http://example.com", 12, 29},
56 56
57 // Different domains and password form origin url with 57 // Different domains and password form origin url with
58 // non-default port for the scheme. 58 // non-default port for the scheme.
59 {"https://another.org", "https://example.com:8001/login#form?value=3", 59 {"https://another.org", "https://example.com:8001/login#form?value=3",
60 false, PasswordTittleType::SAVE_PASSWORD, "https://example.com:8001", 0, 60 false, PasswordTittleType::SAVE_PASSWORD, "https://example.com:8001", 0,
61 0}, 61 0},
62 {"https://another.org", "https://example.com:8001/login#form?value=3", true, 62 {"https://another.org", "https://example.com:8001/login#form?value=3", true,
63 PasswordTittleType::SAVE_PASSWORD, "https://example.com:8001", 12, 29}, 63 PasswordTittleType::SAVE_PASSWORD, "https://example.com:8001", 12, 29},
64 64
65 // Update bubble. 65 // Update bubble, same domains.
66 {"http://example.com/landing", "http://example.com/login#form?value=3", 66 {"http://example.com/landing", "http://example.com/login#form?value=3",
67 false, PasswordTittleType::UPDATE_PASSWORD, "this site", 0, 0}, 67 false, PasswordTittleType::UPDATE_PASSWORD, "this site", 0, 0},
68 {"http://example.com/landing", "http://example.com/login#form?value=3", 68 {"http://example.com/landing", "http://example.com/login#form?value=3",
69 true, PasswordTittleType::UPDATE_PASSWORD, "this site", 12, 29}, 69 true, PasswordTittleType::UPDATE_PASSWORD, "this site", 12, 29},
70 70
71 // Update bubble, different domains.
72 {"https://another.org", "http://example.com/login#form?value=3", false,
73 PasswordTittleType::UPDATE_PASSWORD, "http://example.com", 0, 0},
74 {"https://another.org", "http://example.com/login#form?value=3", true,
75 PasswordTittleType::UPDATE_PASSWORD, "http://example.com", 12, 29},
76
71 // Same domains, federated credential. 77 // Same domains, federated credential.
72 {"http://example.com/landing", "http://example.com/login#form?value=3", 78 {"http://example.com/landing", "http://example.com/login#form?value=3",
73 false, PasswordTittleType::SAVE_ACCOUNT, "this site", 0, 0}, 79 false, PasswordTittleType::SAVE_ACCOUNT, "this site", 0, 0},
74 {"http://example.com/landing", "http://example.com/login#form?value=3", 80 {"http://example.com/landing", "http://example.com/login#form?value=3",
75 true, PasswordTittleType::SAVE_ACCOUNT, "this site", 12, 29}, 81 true, PasswordTittleType::SAVE_ACCOUNT, "this site", 12, 29},
76 82
77 // Different subdomains, federated credential. 83 // Different subdomains, federated credential.
78 {"https://a.example.com/landing", 84 {"https://a.example.com/landing",
79 "https://b.example.com/login#form?value=3", false, 85 "https://b.example.com/login#form?value=3", false,
80 PasswordTittleType::SAVE_ACCOUNT, "this site", 0, 0}, 86 PasswordTittleType::SAVE_ACCOUNT, "this site", 0, 0},
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 base::string16 branding = 167 base::string16 branding =
162 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK); 168 l10n_util::GetStringUTF16(IDS_PASSWORD_MANAGER_SMART_LOCK);
163 base::string16 title; 169 base::string16 title;
164 gfx::Range title_link_range; 170 gfx::Range title_link_range;
165 GetAccountChooserDialogTitleTextAndLinkRange( 171 GetAccountChooserDialogTitleTextAndLinkRange(
166 false /* is_smartlock_branding_enabled */, &title, &title_link_range); 172 false /* is_smartlock_branding_enabled */, &title, &title_link_range);
167 EXPECT_GE(title.find(branding, 0), title.size()); 173 EXPECT_GE(title.find(branding, 0), title.size());
168 EXPECT_EQ(0U, title_link_range.start()); 174 EXPECT_EQ(0U, title_link_range.start());
169 EXPECT_EQ(0U, title_link_range.end()); 175 EXPECT_EQ(0U, title_link_range.end());
170 } 176 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_view_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698