#include "chrome/browser/extensions/safe_browsing_verdict_handler.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_base.h"
#include "chrome/browser/extensions/test_blocklist.h"
#include "chrome/browser/profiles/profile.h"
#include "components/safe_browsing/buildflags.h"
#include "extensions/browser/blocklist_extension_prefs.h"
#include "extensions/browser/blocklist_state.h"
#include "extensions/test/extension_state_tester.h"
#if BUILDFLAG(SAFE_BROWSING_DB_LOCAL)
#define ENABLE_BLOCKLIST_TESTS
#endif
namespace extensions {
namespace {
constexpr char kGood0[] = …;
constexpr char kGood1[] = …;
constexpr char kGood2[] = …;
}
class SafeBrowsingVerdictHandlerUnitTest : public ExtensionServiceTestBase { … };
#if defined(ENABLE_BLOCKLIST_TESTS)
TEST_F(SafeBrowsingVerdictHandlerUnitTest, GreylistedExtensionDisabled) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest, GreylistDontEnableManuallyDisabled) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest, GreylistUnknownDontChange) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
UnblocklistedExtensionStillGreylisted) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
GreylistedExtensionDoesNotDisableAgain) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
GreylistedExtensionDisableAgainIfReAdded) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
DisableExtensionForDifferentGreylistState) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
DisableExtensionWhenSwitchingBetweenGreylistStates) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest, AcknowledgedStateBackFilled) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
ExtensionUninstalledWhenBlocklisted) { … }
TEST_F(SafeBrowsingVerdictHandlerUnitTest,
ExtensionUninstalledWhenBlocklistFetching) { … }
#endif
}