Commit 63a28f69 authored by Alex Ilin's avatar Alex Ilin Committed by Commit Bot

[signin] Remove the kSigninReauthPrompt feature flag

The flag is no longer needed since the Gaia endpoint has been rolled out
to prod. The only consumer of Reauth feature is backed by its own
feature flag.

Bug: 1045515
Change-Id: Ia12aa2abfc064a431c1a24ab85de231c07e8ebfa
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2339530
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Auto-Submit: Alex Ilin <alexilin@chromium.org>
Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796358}
parent 3830012e
......@@ -8,6 +8,3 @@
const base::Feature kDiceWebSigninInterceptionFeature{
"DiceWebSigninInterception", base::FEATURE_DISABLED_BY_DEFAULT};
#endif // ENABLE_DICE_SUPPORT
const base::Feature kSigninReauthPrompt = {"SigninReauthPrompt",
base::FEATURE_DISABLED_BY_DEFAULT};
......@@ -12,6 +12,4 @@
extern const base::Feature kDiceWebSigninInterceptionFeature;
#endif // ENABLE_DICE_SUPPORT
extern const base::Feature kSigninReauthPrompt;
#endif // CHROME_BROWSER_SIGNIN_SIGNIN_FEATURES_H_
......@@ -67,15 +67,6 @@ SigninReauthViewController::SigninReauthViewController(
// show it in some cases in the future.
ShowReauthConfirmationDialog();
if (!base::FeatureList::IsEnabled(kSigninReauthPrompt)) {
// Approve reauth automatically.
gaia_reauth_type_ = GaiaReauthType::kAutoApproved;
gaia_reauth_page_state_ = GaiaReauthPageState::kDone;
gaia_reauth_page_result_ = signin::ReauthResult::kSuccess;
OnStateChanged();
return;
}
// Navigate to the Gaia reauth challenge page in background.
reauth_web_contents_ =
content::WebContents::Create(content::WebContents::CreateParams(
......
......@@ -138,10 +138,6 @@ base::Bucket OnceUserAction(SigninReauthViewController::UserAction action) {
// Browser tests for SigninReauthViewController.
class SigninReauthViewControllerBrowserTest : public InProcessBrowserTest {
public:
SigninReauthViewControllerBrowserTest() {
scoped_feature_list_.InitAndEnableFeature(kSigninReauthPrompt);
}
void SetUp() override {
ASSERT_TRUE(https_server()->InitializeAndListen());
InProcessBrowserTest::SetUp();
......@@ -225,7 +221,6 @@ class SigninReauthViewControllerBrowserTest : public InProcessBrowserTest {
base::HistogramTester* histogram_tester() { return &histogram_tester_; }
private:
base::test::ScopedFeatureList scoped_feature_list_;
net::EmbeddedTestServer https_server_{net::EmbeddedTestServer::TYPE_HTTPS};
base::HistogramTester histogram_tester_;
std::unique_ptr<net::test_server::ControllableHttpResponse>
......
......@@ -200,34 +200,3 @@ IN_PROC_BROWSER_TEST_F(SignInViewControllerBrowserTest,
dialog_observer.WaitForDialogClosed();
EXPECT_FALSE(browser()->signin_view_controller()->ShowsModalDialog());
}
// Tests that the confirm button is focused by default in the reauth dialog.
IN_PROC_BROWSER_TEST_F(SignInViewControllerBrowserTest, ReauthDefaultFocus) {
const auto kAccessPoint =
signin_metrics::ReauthAccessPoint::kAutofillDropdown;
content::TestNavigationObserver content_observer(
signin::GetReauthConfirmationURL(kAccessPoint));
content_observer.StartWatchingNewWebContents();
CoreAccountId account_id = signin::SetUnconsentedPrimaryAccount(
GetIdentityManager(), "alice@gmail.com")
.account_id;
signin::ReauthResult reauth_result;
base::RunLoop run_loop;
std::unique_ptr<SigninViewController::ReauthAbortHandle> abort_handle =
browser()->signin_view_controller()->ShowReauthPrompt(
account_id, kAccessPoint,
base::BindLambdaForTesting([&](signin::ReauthResult result) {
reauth_result = result;
run_loop.Quit();
}));
EXPECT_TRUE(browser()->signin_view_controller()->ShowsModalDialog());
content_observer.Wait();
ASSERT_TRUE(ui_test_utils::SendKeyPressSync(browser(), ui::VKEY_RETURN,
/*control=*/false,
/*shift=*/false, /*alt=*/false,
/*command=*/false));
run_loop.Run();
EXPECT_EQ(reauth_result, signin::ReauthResult::kSuccess);
EXPECT_FALSE(browser()->signin_view_controller()->ShowsModalDialog());
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment