#include <tuple>
#include "base/ranges/algorithm.h"
#include "base/test/metrics/user_action_tester.h"
#include "base/test/test_future.h"
#include "chrome/browser/apps/app_service/app_registry_cache_waiter.h"
#include "chrome/browser/apps/link_capturing/enable_link_capturing_infobar_delegate.h"
#include "chrome/browser/apps/link_capturing/intent_picker_info.h"
#include "chrome/browser/apps/link_capturing/link_capturing_feature_test_support.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/views/web_apps/web_app_link_capturing_test_utils.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/web_app_command_manager.h"
#include "chrome/browser/web_applications/web_app_command_scheduler.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 "components/infobars/content/content_infobar_manager.h"
#include "components/infobars/core/confirm_infobar_delegate.h"
#include "components/infobars/core/infobar.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/test_navigation_observer.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/test/button_test_api.h"
#include "ui/views/widget/any_widget_observer.h"
#include "url/gurl.h"
#include "url/url_constants.h"
namespace web_app {
namespace {
content::WebContents* GetActiveWebContents(Browser* browser) { … }
class EnableLinkCapturingInfobarBrowserTest
: public WebAppNavigationBrowserTest,
public testing::WithParamInterface<bool> { … };
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
InfoBarShowsOnIntentPickerLaunch) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
EnableLinkCapturingThroughInfoBar) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
InfoBarNotShownOnLinkCapturingEnabled) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
RecordUserActionCancelled) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
RecordUserActionIgnored) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest, AppLaunched) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest, BarRemoved) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
DISABLED_InfoBarHiddenAfterDismissals) { … }
IN_PROC_BROWSER_TEST_P(EnableLinkCapturingInfobarBrowserTest,
OuterAppNoInfoBar) { … }
INSTANTIATE_TEST_SUITE_P(…);
}
}