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

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

Issue 221853003: Password bubble: Add a test for displayed password length. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
index 5751f60fda08440d22d0ab8b8911c173cebaf6cf..96ebee5879533e21f04f89e4df03e79016153659 100644
--- a/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_bubble_model.cc
@@ -99,3 +99,12 @@ void ManagePasswordsBubbleModel::WebContentsDestroyed(
// The WebContents have been destroyed.
web_contents_ = NULL;
}
+
+// static
+base::string16 ManagePasswordsBubbleModel::GetPasswordDisplayString(
Patrick Dubroy 2014/04/02 09:41:50 I definitely think adding some tests for the Manag
+ const base::string16& password) {
+ const wchar_t kPasswordBullet = 0x2022;
+ const size_t kMaxPasswordChar = 22;
+ return base::string16(std::min(password.length(), kMaxPasswordChar),
+ kPasswordBullet);
+}

Powered by Google App Engine
This is Rietveld 408576698