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

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

Issue 854173003: Credential Management API: the account chooser dialog supports custom avatars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added a test Created 5 years, 11 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_test.cc
diff --git a/chrome/browser/ui/passwords/manage_passwords_test.cc b/chrome/browser/ui/passwords/manage_passwords_test.cc
index db100dbd1abd4d03bc0bcbb21627401880a48838..4de9388adf079195aeff6cb342ad1327161a65f4 100644
--- a/chrome/browser/ui/passwords/manage_passwords_test.cc
+++ b/chrome/browser/ui/passwords/manage_passwords_test.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/ui/passwords/manage_passwords_test.h"
+#include "base/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/ui/browser.h"
@@ -80,6 +81,19 @@ void ManagePasswordsTest::SetupBlackistedPassword() {
GetController()->UpdateIconAndBubbleState(view());
}
+void ManagePasswordsTest::SetupChooseCredentials(
+ ScopedVector<autofill::PasswordForm> local_credentials,
+ ScopedVector<autofill::PasswordForm> federated_credentials) {
+ base::string16 kTestUsername = base::ASCIIToUTF16("test_username");
+ autofill::PasswordFormMap map;
+ map[kTestUsername] = test_form();
+ GetController()->OnChooseCredentials(
+ local_credentials.Pass(),
+ federated_credentials.Pass(),
+ base::Bind(&ManagePasswordsTest::OnChooseCredential, this));
+ GetController()->UpdateIconAndBubbleState(view());
+}
+
base::HistogramSamples* ManagePasswordsTest::GetSamples(
const char* histogram) {
// Ensure that everything has been properly recorded before pulling samples.
« no previous file with comments | « chrome/browser/ui/passwords/manage_passwords_test.h ('k') | chrome/browser/ui/views/passwords/credentials_item_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698