#include "chrome/browser/ui/views/frame/browser_non_client_frame_view.h"
#include "base/memory/raw_ptr.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "chrome/browser/extensions/extension_browsertest.h"
#include "chrome/browser/themes/theme_service.h"
#include "chrome/browser/themes/theme_service_factory.h"
#include "chrome/browser/ui/page_action/page_action_icon_type.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/custom_tab_bar_view.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/browser/ui/web_applications/test/web_app_browsertest_util.h"
#include "chrome/browser/web_applications/test/os_integration_test_override_impl.h"
#include "chrome/browser/web_applications/test/web_app_install_test_utils.h"
#include "chrome/browser/web_applications/web_app_install_info.h"
#include "chrome/browser/web_applications/web_app_install_utils.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/autofill/content/browser/content_autofill_driver.h"
#include "components/autofill/content/browser/test_autofill_manager_injector.h"
#include "components/autofill/core/browser/browser_autofill_manager.h"
#include "components/autofill/core/browser/form_data_importer.h"
#include "components/autofill/core/browser/form_data_importer_test_api.h"
#include "components/autofill/core/browser/payments/credit_card_save_manager.h"
#include "components/autofill/core/browser/test_autofill_manager_waiter.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 "content/public/test/theme_change_waiter.h"
#include "third_party/blink/public/mojom/frame/fullscreen.mojom.h"
#include "third_party/blink/public/mojom/manifest/manifest.mojom.h"
#include "ui/color/color_id.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/color_utils.h"
namespace {
class TestAutofillManager : public autofill::BrowserAutofillManager { … };
}
class BrowserNonClientFrameViewBrowserTest
: public extensions::ExtensionBrowserTest { … };
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
BrowserFrameColorThemed) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
BookmarkAppFrameColorCustomTheme) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
BookmarkAppFrameColorCustomThemeNoThemeColor) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
OpaqueFrameColorForTransparentWebAppThemeColor) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
BookmarkAppFrameColorSystemTheme) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
IncognitoIsCorrectColor) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
FullscreenForTabTitlebarHeight) { … }
#if BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(IS_LINUX)
#define MAYBE_CustomTabBarIsVisibleInFullscreen …
#else
#define MAYBE_CustomTabBarIsVisibleInFullscreen …
#endif
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
MAYBE_CustomTabBarIsVisibleInFullscreen) { … }
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
HTMLMetaThemeColorOverridesManifest) { … }
class SaveCardOfferObserver
: public autofill::CreditCardSaveManager::ObserverForTest { … };
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
DISABLED_SaveCardIcon) { … }
#if BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(BrowserNonClientFrameViewBrowserTest,
BrowserFrameWindowMask) {
BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser());
BrowserNonClientFrameView* frame_view = browser_view->frame()->GetFrameView();
SkPath path;
frame_view->GetWindowMask(frame_view->bounds().size(), &path);
#if BUILDFLAG(IS_CHROMEOS_LACROS)
EXPECT_FALSE(path.isEmpty());
#elif BUILDFLAG(IS_CHROMEOS_ASH)
EXPECT_TRUE(path.isEmpty());
#endif
}
#endif