#include "chrome/browser/picture_in_picture/auto_pip_setting_view.h"
#include <memory>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/test/mock_callback.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/url_formatter/url_formatter.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/base/ui_base_features.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/text_elider.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_utils.h"
HasSubstr;
NotNull;
UiResult;
struct TestParams { … };
class AutoPipSettingViewTest : public views::ViewsTestBase,
public testing::WithParamInterface<TestParams> { … };
TEST_F(AutoPipSettingViewTest, TestInitControlViewButton) { … }
TEST_F(AutoPipSettingViewTest, TestShow) { … }
TEST_F(AutoPipSettingViewTest, TestViewConstructor) { … }
TEST_F(AutoPipSettingViewTest, TestBubbleTitleNoElide) { … }
TEST_F(AutoPipSettingViewTest, TestBubbleTitleElideBehaviorForNonFileURL) { … }
TEST_F(AutoPipSettingViewTest, TestBubbleTitleElideBehaviorForFileURL) { … }
TEST_F(AutoPipSettingViewTest, TestOriginLabelForGURLWithLocalHost) { … }
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) || \
BUILDFLAG(IS_LINUX)
#define MAYBE_WidgetIsCenteredWhenArrowIsFloat …
#else
#define MAYBE_WidgetIsCenteredWhenArrowIsFloat …
#endif
TEST_F(AutoPipSettingViewTest, MAYBE_WidgetIsCenteredWhenArrowIsFloat) { … }
const struct TestParams kTestParams[] = …;
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(AutoPipSettingViewTest, ButtonCallbackTest) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(AutoPipSettingViewTest, MultipleClicksDontCrash) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(AutoPipSettingViewTest, OverlayBackgroundLayerIsHidden) { … }