#include "chrome/browser/apps/link_capturing/link_capturing_navigation_throttle.h"
#include "base/strings/strcat.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/test_future.h"
#include "chrome/browser/apps/app_service/app_registry_cache_waiter.h"
#include "chrome/browser/apps/link_capturing/link_capturing_feature_test_support.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/web_applications/os_integration/os_integration_manager.h"
#include "chrome/browser/web_applications/test/os_integration_test_override_impl.h"
#include "chrome/browser/web_applications/test/web_app_test_observers.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/test_navigation_observer.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "url/url_constants.h"
namespace apps {
namespace {
class LinkCapturingNavigationThrottleBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByAHrefClick) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByAHrefClickTargetBlank) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByAHrefClickServerRedirect) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByAHrefClickTargetBlankServerRedirect) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByAHrefClickTargetBlankJavaScriptRedirect) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByButtonClickJavaScriptWindowOpen) { … }
IN_PROC_BROWSER_TEST_F(
LinkCapturingNavigationThrottleBrowserTest,
TriggeredByButtonClickJavaScriptWindowOpenAboutBlankLocationHrefUrl) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByButtonClickJavaScriptLocationHrefUrl) { … }
IN_PROC_BROWSER_TEST_F(LinkCapturingNavigationThrottleBrowserTest,
TriggeredByNoClickJavaScriptWindowOpen) { … }
}
}