#include "chrome/browser/picture_in_picture/auto_pip_setting_helper.h"
#include <memory>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/test/mock_callback.h"
#include "chrome/browser/picture_in_picture/auto_pip_setting_overlay_view.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
#include "components/permissions/permission_decision_auto_blocker.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "ui/views/test/views_test_base.h"
#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_utils.h"
_;
AtLeast;
Return;
class MockAutoBlocker : public permissions::PermissionDecisionAutoBlockerBase { … };
class AutoPipSettingHelperTest : public views::ViewsTestBase { … };
TEST_F(AutoPipSettingHelperTest, NoUiIfContentSettingIsAllow) { … }
TEST_F(AutoPipSettingHelperTest, UiShownIfContentSettingIsAsk) { … }
TEST_F(AutoPipSettingHelperTest,
NoUiButCallbackIsCalledIfContentSettingIsBlock) { … }
TEST_F(AutoPipSettingHelperTest, AllowOnceDoesNotCallCloseCb) { … }
TEST_F(AutoPipSettingHelperTest, AllowOnEveryVisitDoesNotCallCloseCb) { … }
TEST_F(AutoPipSettingHelperTest, BlockDoesCallCloseCb) { … }
TEST_F(AutoPipSettingHelperTest,
DestructionDoesNotNotifyEmbargoEvenIfUiIsCreated) { … }
TEST_F(AutoPipSettingHelperTest, DismissNotifiesEmbargoIfUiIsCreated) { … }
TEST_F(AutoPipSettingHelperTest,
DismissDoesNotNotifyEmbargoIfUiIsNotRequested) { … }
TEST_F(AutoPipSettingHelperTest,
UiIsNotShownIfContentSettingIsAskButUnderEmbargo) { … }