0

[FedCM] Show filtered accounts by default

launch/4338516

Bug: 40945672
Change-Id: I9e8c30a9962d45a6a5a520c64695620b0d2152e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6137732
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1401885}
This commit is contained in:
Nicolás Peña
2025-01-03 10:43:20 -08:00
committed by Chromium LUCI CQ
parent d7e15e8403
commit 54fc40dafc
2 changed files with 11 additions and 16 deletions

@ -116,14 +116,9 @@ constexpr char kOtherDomainHint[] = "other_domain@corp.com";
constexpr char kToken[] = "[not a real token]";
constexpr char kEmptyToken[] = "";
constexpr char kAccountLabelNoMatchMessage[] =
"Accounts were received, but none matched the label.";
constexpr char kLoginHintNoMatchMessage[] =
"Accounts were received, but none matched the loginHint.";
constexpr char kDomainHintNoMatchMessage[] =
"Accounts were received, but none matched the domainHint.";
constexpr char kFilterNoMatchMessage[] =
"Accounts were received, but none matched the login hint, domain hint, "
"and/or account labels provided.";
static const std::vector<std::string> kDomainHintVector = {kDomainHint};
static const std::vector<std::string> kLabelVector = {"label"};
@ -5373,7 +5368,7 @@ TEST_F(FederatedAuthRequestImplTest, AccountLabelMultipleAccountsNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kAccountLabelNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
MockConfiguration configuration = kConfigurationValid;
@ -5467,7 +5462,7 @@ TEST_F(FederatedAuthRequestImplTest, LoginHintSingleAccountNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kLoginHintNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
MockConfiguration configuration = kConfigurationValid;
@ -5538,7 +5533,7 @@ TEST_F(FederatedAuthRequestImplTest, LoginHintMultipleAccountsNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kLoginHintNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
MockConfiguration configuration = kConfigurationValid;
@ -5611,7 +5606,7 @@ TEST_F(FederatedAuthRequestImplTest, DomainHintSingleAccountStarNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kDomainHintNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
MockConfiguration configuration = kConfigurationValid;
@ -5635,7 +5630,7 @@ TEST_F(FederatedAuthRequestImplTest, DomainHintSingleAccountNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kDomainHintNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
MockConfiguration configuration = kConfigurationValid;
@ -5663,7 +5658,7 @@ TEST_F(FederatedAuthRequestImplTest, DomainHintNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kDomainHintNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
RunAuthTest(parameters, expectations, kConfigurationValid);
@ -5758,7 +5753,7 @@ TEST_F(FederatedAuthRequestImplTest, DomainHintMultipleAccountsNoMatch) {
const RequestExpectations expectations = {
RequestTokenStatus::kError,
FederatedAuthRequestResult::kAccountsListEmpty,
{kDomainHintNoMatchMessage},
{kFilterNoMatchMessage},
/*selected_idp_config_url=*/std::nullopt};
MockConfiguration configuration = kConfigurationValid;

@ -469,7 +469,7 @@ BASE_FEATURE(kFedCmSelectiveDisclosure,
// login to an account. These accounts are shown greyed out.
BASE_FEATURE(kFedCmShowFilteredAccounts,
"FedCmShowFilteredAccounts",
base::FEATURE_DISABLED_BY_DEFAULT);
base::FEATURE_ENABLED_BY_DEFAULT);
// Enables bypassing the well-known file enforcement.
BASE_FEATURE(kFedCmWithoutWellKnownEnforcement,