#include "base/command_line.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/browser/ui/web_applications/app_browser_controller.h"
#include "chrome/browser/ui/web_applications/web_app_browsertest_base.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/security_interstitials/content/security_interstitial_controller_client.h"
#include "components/security_interstitials/content/security_interstitial_page.h"
#include "components/security_interstitials/content/security_interstitial_tab_helper.h"
#include "components/security_interstitials/content/settings_page_helper.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/navigation_handle.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_mock_cert_verifier.h"
#include "content/public/test/test_navigation_observer.h"
#include "net/dns/mock_host_resolver.h"
#include "third_party/blink/public/common/features.h"
#include "ui/base/clipboard/clipboard.h"
#include "ui/views/controls/button/image_button.h"
namespace {
class TestTitleObserver : public TabStripModelObserver { … };
Browser* OpenPopup(content::WebContents* web_contents, const GURL& target_url) { … }
void NavigateAndWait(content::WebContents* web_contents,
const GURL& target_url) { … }
void SetTitleAndLocation(content::WebContents* web_contents,
const std::u16string title,
const GURL& location) { … }
class UrlHidingInterstitialPage
: public security_interstitials::SecurityInterstitialPage { … };
class UrlHidingWebContentsObserver : public content::WebContentsObserver { … };
}
class CustomTabBarViewBrowserTest : public web_app::WebAppBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
IsNotCreatedInTabbedBrowser) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest, IsNotCreatedInPopup) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
BackToAppButtonIsNotVisibleInOutOfScopePopups) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest, IsUsedForDesktopPWA) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest, ShowsWithMixedContent) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest, TitleAndLocationUpdate) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
UsesLocationInsteadOfEmptyTitles) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
OutOfScopeUrlShouldBeClosable) { … }
#if !BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
RightClickMenuShowsCopyUrl) { … }
#endif
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
ScopeAboveLaunchURLShouldBeOutOfScopeAndClosable) { … }
IN_PROC_BROWSER_TEST_F(
CustomTabBarViewBrowserTest,
WhenNoHistoryIsInScopeCloseShouldNavigateToAppLaunchURL) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
OriginsWithEmojiArePunyCoded) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
OriginsWithNonASCIICharactersDisplayNormally) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
BackToAppButtonIsNotVisibleInScope) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest,
BackToAppButtonIsNotVisibleInBookmarkAppOnOrigin) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest, InterstitialCanHideOrigin) { … }
IN_PROC_BROWSER_TEST_F(CustomTabBarViewBrowserTest, BlobUrlLocation) { … }