#include "chrome/browser/extensions/api/identity/web_auth_flow.h"
#include "base/strings/strcat.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/time/time.h"
#include "chrome/browser/extensions/api/identity/web_auth_flow_info_bar_delegate.h"
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/keep_alive/profile_keep_alive_types.h"
#include "chrome/browser/profiles/keep_alive/scoped_profile_keep_alive.h"
#include "chrome/browser/profiles/nuke_profile_directory_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/sessions/session_restore.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "components/keep_alive_registry/keep_alive_types.h"
#include "components/keep_alive_registry/scoped_keep_alive.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/back_forward_cache_util.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/test_navigation_observer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
class MockWebAuthFlowDelegate : public WebAuthFlow::Delegate { … };
class WebAuthFlowBrowserTest : public InProcessBrowserTest { … };
class WebAuthFlowInBrowserTabParamBrowserTest : public WebAuthFlowBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowURLChangeCalled) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowFailureChangeCalled) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowFailureCalledInteractionRequired) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowInteractionRequiredWithTimeout) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowInteractionRequiredWithDefaultTimeout) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowPageLoadTimeout) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowRedirectBeforeTimeout) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowInBrowserTabParamBrowserTest,
OnAuthFlowMultipleRedirects) { … }
class WebAuthFlowFencedFrameTest
: public WebAuthFlowInBrowserTabParamBrowserTest { … };
IN_PROC_BROWSER_TEST_F(WebAuthFlowFencedFrameTest,
FencedFrameNavigationSuccess) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowFencedFrameTest,
FencedFrameNavigationFailure) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowBrowserTest,
InteractivePopupWindowCreatedWithAuthURL_ThenCloseTab) { … }
IN_PROC_BROWSER_TEST_F(
WebAuthFlowBrowserTest,
InteractivePopupWindowCreatedWithAuthURL_NavigationInURLDoesNotBreakTheFlow) { … }
IN_PROC_BROWSER_TEST_F(
WebAuthFlowBrowserTest,
InteractiveNoBrowser_WebAuthCreatesBrowserWithPopupWindow) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowBrowserTest,
InteractiveNoBrowser_NotActivatingSessionRestore) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowBrowserTest, SilentNewTabNotCreated) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowBrowserTest,
InteractiveNewTabCreatedWithAuthURL_NoInfoBarByDefault) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowBrowserTest,
PopupWindowOpened_ThenCloseWindow) { … }
IN_PROC_BROWSER_TEST_F(
WebAuthFlowBrowserTest,
Interactive_MarkedForDeletionProfileNotAllowedToCreatePopupWindow) { … }
IN_PROC_BROWSER_TEST_F(WebAuthFlowBrowserTest, PopupWindowOpened_WithBounds) { … }
}