#include "chrome/browser/ui/webui/privacy_sandbox/privacy_sandbox_dialog_handler.h"
#include "chrome/browser/privacy_sandbox/mock_privacy_sandbox_service.h"
#include "chrome/browser/privacy_sandbox/privacy_sandbox_service.h"
#include "chrome/browser/privacy_sandbox/privacy_sandbox_service_factory.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_renderer_host.h"
#include "content/public/test/test_web_ui.h"
#include "content/public/test/web_contents_tester.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace {
constexpr char kCallbackId[] = …;
class MockPrivacySandboxDialogView { … };
}
class PrivacySandboxDialogHandlerTest : public testing::Test { … };
class PrivacySandboxConsentDialogHandlerTest
: public PrivacySandboxDialogHandlerTest { … };
TEST_F(PrivacySandboxConsentDialogHandlerTest, HandleResizeDialog) { … }
TEST_F(PrivacySandboxConsentDialogHandlerTest, HandleShowDialog) { … }
TEST_F(PrivacySandboxConsentDialogHandlerTest, HandleClickLearnMore) { … }
TEST_F(PrivacySandboxConsentDialogHandlerTest, HandleConsentAccepted) { … }
TEST_F(PrivacySandboxConsentDialogHandlerTest, HandleConsentDeclined) { … }
TEST_F(PrivacySandboxConsentDialogHandlerTest,
NotifyServiceAboutPromptAction_Invokes_PromptActionOccured) { … }
class PrivacySandboxNoticeDialogHandlerTest
: public PrivacySandboxDialogHandlerTest { … };
TEST_F(PrivacySandboxNoticeDialogHandlerTest, HandleResizeDialog) { … }
TEST_F(PrivacySandboxNoticeDialogHandlerTest, HandleShowDialog) { … }
TEST_F(PrivacySandboxNoticeDialogHandlerTest, HandleOpenSettings) { … }
TEST_F(PrivacySandboxNoticeDialogHandlerTest, HandleNoticeAcknowledge) { … }
TEST_F(PrivacySandboxNoticeDialogHandlerTest,
NotifyServiceAboutPromptAction_Invokes_PromptActionOccured) { … }
class PrivacySandboxNoticeRestrictedDialogHandlerTest
: public PrivacySandboxDialogHandlerTest { … };
TEST_F(PrivacySandboxNoticeRestrictedDialogHandlerTest, HandleOpenSettings) { … }
TEST_F(PrivacySandboxNoticeRestrictedDialogHandlerTest, HandleAcknowledge) { … }