Commit 62ff616d authored by Alex Ilin's avatar Alex Ilin Committed by Commit Bot

[signin] Add reauth browser tests with a fake Gaia page

This CL adds a new set of tests for the reauth dialog. These tests
check interactions with a Gaia Reauth endpoint that is imitated through
an EmbeddedTestServer.

The main "embedded/xreauth/chrome" endpoint operates in two modes:
- In the default mode, the endpoint redirects to the "challenge" URL
whose response can be controlled within the test by a
ControllableHttpResponse.
- If the "?done" query is present, the endpoint returns the
HTTP_NO_CONTENT response that signifies a successful reauth.

The CL also extracts common test code into test suite functions to
reduce the code duplication and make the tests code more readable.

Bug: 1045515
Change-Id: I89d4aac57ef25168def1341fb63b1a7498dcfa0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2225396
Commit-Queue: Alex Ilin <alexilin@chromium.org>
Reviewed-by: default avatarDavid Roger <droger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#774205}
parent b0562f18
......@@ -8,3 +8,6 @@
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,4 +12,6 @@
extern const base::Feature kDiceWebSigninInterceptionFeature;
#endif // ENABLE_DICE_SUPPORT
extern const base::Feature kSigninReauthPrompt;
#endif // CHROME_BROWSER_SIGNIN_SIGNIN_FEATURES_H_
......@@ -13,6 +13,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/signin/reauth_result.h"
#include "chrome/browser/signin/reauth_tab_helper.h"
#include "chrome/browser/signin/signin_features.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_navigator_params.h"
#include "content/public/browser/browser_task_traits.h"
......@@ -24,9 +25,6 @@
namespace {
const base::Feature kSigninReauthPrompt = {"SigninReauthPrompt",
base::FEATURE_DISABLED_BY_DEFAULT};
class ReauthWebContentsObserver : public content::WebContentsObserver {
public:
ReauthWebContentsObserver(content::WebContents* web_contents,
......
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