#include <tuple>
#include "base/location.h"
#include "base/metrics/field_trial_params.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/bind.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "base/types/expected.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/apps/app_service/app_registry_cache_waiter.h"
#include "chrome/browser/apps/app_service/app_service_proxy.h"
#include "chrome/browser/apps/app_service/app_service_proxy_factory.h"
#include "chrome/browser/apps/intent_helper/preferred_apps_test_util.h"
#include "chrome/browser/apps/link_capturing/link_capturing_feature_test_support.h"
#include "chrome/browser/apps/link_capturing/link_capturing_navigation_throttle.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/ui/web_applications/test/web_app_navigation_browsertest.h"
#include "chrome/browser/web_applications/mojom/user_display_mode.mojom.h"
#include "chrome/browser/web_applications/test/web_app_test_observers.h"
#include "chrome/browser/web_applications/web_app_helpers.h"
#include "chrome/browser/web_applications/web_app_provider.h"
#include "chrome/browser/web_applications/web_app_registry_update.h"
#include "chrome/browser/web_applications/web_app_sync_bridge.h"
#include "chrome/common/chrome_features.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/hit_test_region_observer.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom.h"
RenderFrameHost;
WebContents;
PrerenderHostObserver;
PrerenderHostRegistryObserver;
PrerenderTestHelper;
BrowserChangeObserver;
namespace web_app {
namespace {
ClientMode;
class WebAppLinkCapturingBrowserTest
: public WebAppNavigationBrowserTest,
public testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
NavigateExistingClientFromBrowser) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
AboutBlankNavigationCleanUp) { … }
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
#define MAYBE_JavascriptAboutBlankNavigationCleanUp …
#else
#define MAYBE_JavascriptAboutBlankNavigationCleanUp …
#endif
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
MAYBE_JavascriptAboutBlankNavigationCleanUp) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
DifferentPortConsideredDifferent) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
HandleClickFromSandboxedIframe) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
ParentAppWithChildLinks) { … }
#if !BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
ParentAppAndChildAppCapture) { … }
#endif
#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
#define MAYBE_LinkCaptureInWebAppWindow …
#else
#define MAYBE_LinkCaptureInWebAppWindow …
#endif
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
MAYBE_LinkCaptureInWebAppWindow) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
NoLinkCaptureOutOfScopeInAppWindow) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
NoLinkCapturePrerenderNavigation) { … }
IN_PROC_BROWSER_TEST_P(WebAppLinkCapturingBrowserTest,
NoLinkCapturePopupNavigation) { … }
INSTANTIATE_TEST_SUITE_P(…);
class WebAppTabStripLinkCapturingBrowserTest
: public WebAppLinkCapturingBrowserTest { … };
IN_PROC_BROWSER_TEST_P(WebAppTabStripLinkCapturingBrowserTest,
InScopeNavigationsCaptured) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}