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

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

Issue 2531863002: Delete all the traces of federation providers in the account chooser. (Closed)
Patch Set: android2 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
Index: chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
diff --git a/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc b/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
index ba866134ac4c45d40d8a270d4d36aade07d3b8fe..92fa50d70d718c9d3bfd9f32943e18973f7bcabc 100644
--- a/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
+++ b/chrome/browser/ui/passwords/password_dialog_controller_impl_unittest.cc
@@ -52,13 +52,6 @@ autofill::PasswordForm GetLocalForm() {
return form;
}
-autofill::PasswordForm GetFederationProviderForm() {
- autofill::PasswordForm form;
- form.username_value = base::ASCIIToUTF16(kUsername);
- form.origin = GURL("http://idp.com");
- return form;
-}
-
class PasswordDialogControllerTest : public testing::Test {
public:
PasswordDialogControllerTest()
@@ -86,21 +79,15 @@ TEST_F(PasswordDialogControllerTest, ShowAccountChooser) {
autofill::PasswordForm local_form = GetLocalForm();
autofill::PasswordForm local_form2 = local_form;
local_form2.username_value = base::ASCIIToUTF16(kUsername2);
- autofill::PasswordForm idp_form = GetFederationProviderForm();
std::vector<std::unique_ptr<autofill::PasswordForm>> locals;
locals.push_back(base::MakeUnique<autofill::PasswordForm>(local_form));
locals.push_back(base::MakeUnique<autofill::PasswordForm>(local_form2));
autofill::PasswordForm* local_form_ptr = locals[0].get();
- std::vector<std::unique_ptr<autofill::PasswordForm>> federations;
- federations.push_back(base::MakeUnique<autofill::PasswordForm>(idp_form));
EXPECT_CALL(prompt, ShowAccountChooser());
- controller().ShowAccountChooser(&prompt,
- std::move(locals), std::move(federations));
+ controller().ShowAccountChooser(&prompt, std::move(locals));
EXPECT_THAT(controller().GetLocalForms(), ElementsAre(Pointee(local_form),
Pointee(local_form2)));
- EXPECT_THAT(controller().GetFederationsForms(),
- ElementsAre(Pointee(idp_form)));
EXPECT_FALSE(controller().ShouldShowSignInButton());
// Close the dialog.
@@ -124,13 +111,10 @@ TEST_F(PasswordDialogControllerTest, ShowAccountChooserAndSignIn) {
autofill::PasswordForm local_form = GetLocalForm();
std::vector<std::unique_ptr<autofill::PasswordForm>> locals;
locals.push_back(base::MakeUnique<autofill::PasswordForm>(local_form));
- std::vector<std::unique_ptr<autofill::PasswordForm>> federations;
EXPECT_CALL(prompt, ShowAccountChooser());
- controller().ShowAccountChooser(&prompt,
- std::move(locals), std::move(federations));
+ controller().ShowAccountChooser(&prompt, std::move(locals));
EXPECT_THAT(controller().GetLocalForms(), ElementsAre(Pointee(local_form)));
- EXPECT_THAT(controller().GetFederationsForms(), testing::IsEmpty());
EXPECT_TRUE(controller().ShouldShowSignInButton());
// Close the dialog.
@@ -152,8 +136,7 @@ TEST_F(PasswordDialogControllerTest, AccountChooserClosed) {
std::vector<std::unique_ptr<autofill::PasswordForm>> locals;
locals.push_back(base::MakeUnique<autofill::PasswordForm>(GetLocalForm()));
EXPECT_CALL(prompt, ShowAccountChooser());
- controller().ShowAccountChooser(&prompt, std::move(locals),
- PasswordDialogController::FormsVector());
+ controller().ShowAccountChooser(&prompt, std::move(locals));
EXPECT_CALL(ui_controller_mock(), OnDialogHidden());
controller().OnCloseDialog();

Powered by Google App Engine
This is Rietveld 408576698