#include "chrome/browser/ui/test/test_browser_ui.h"
#include "base/command_line.h"
#include "base/test/gtest_util.h"
#include "base/test/test_switches.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "ui/base/ui_base_features.h"
#include "ui/base/ui_base_switches.h"
#if defined(USE_AURA)
#include "ui/aura/client/cursor_client.h"
#include "ui/aura/window.h"
#include "ui/events/test/event_generator.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
#endif
#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC) || \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
#include "content/public/common/content_switches.h"
#include "ui/base/test/skia_gold_matching_algorithm.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/test/draw_waiter_for_test.h"
#include "ui/views/test/view_skia_gold_pixel_diff.h"
#include "ui/views/widget/widget.h"
#endif
#if BUILDFLAG(IS_WIN)
#include "ui/events/platform/platform_event_source.h"
#endif
#if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
#define SUPPORTS_PIXEL_TEST
#endif
namespace {
std::string NameFromTestCase() { … }
#if defined(USE_AURA)
class ScopedMouseDisabler { … };
#endif
}
TestBrowserUi::TestBrowserUi() { … }
TestBrowserUi::~TestBrowserUi() = default;
ui::test::ActionResult TestBrowserUi::VerifyPixelUi(
views::Widget* widget,
const std::string& screenshot_prefix,
const std::string& screenshot_name) { … }
ui::test::ActionResult TestBrowserUi::VerifyPixelUi(
views::View* view,
const std::string& screenshot_prefix,
const std::string& screenshot_name) { … }
void TestBrowserUi::SetPixelMatchAlgorithm(
std::unique_ptr<ui::test::SkiaGoldMatchingAlgorithm> algorithm) { … }
void TestBrowserUi::ShowAndVerifyUi() { … }
bool TestBrowserUi::IsInteractiveUi() const { … }