#include "chrome/browser/safe_browsing/ohttp_key_service_factory.h"
#include "chrome/browser/safe_browsing/test_safe_browsing_service.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
#include "content/public/test/browser_task_environment.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace safe_browsing {
class OhttpKeyServiceFactoryTest : public testing::Test { … };
#if BUILDFLAG(IS_ANDROID)
TEST_F(OhttpKeyServiceFactoryTest, DisabledForRegularProfiles) {
TestingProfile* profile = profile_manager_->CreateTestingProfile("profile");
EXPECT_EQ(nullptr, OhttpKeyServiceFactory::GetForProfile(profile));
}
#else
TEST_F(OhttpKeyServiceFactoryTest, EnabledForRegularProfiles) { … }
TEST_F(OhttpKeyServiceFactoryTest,
EnabledForRegularProfiles_HashRealTimeLookupsDisabled) { … }
TEST_F(OhttpKeyServiceFactoryTest, DisabledForIncognitoMode) { … }
TEST_F(OhttpKeyServiceFactoryTest, DisabledForGuestMode) { … }
#endif
}