#ifndef CHROME_BROWSER_UI_SAFETY_HUB_SAFETY_HUB_TEST_UTIL_H_
#define CHROME_BROWSER_UI_SAFETY_HUB_SAFETY_HUB_TEST_UTIL_H_
#include <memory>
#include <string_view>
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/safety_hub/safety_hub_service.h"
#include "chrome/browser/ui/safety_hub/unused_site_permissions_service.h"
#include "components/password_manager/core/browser/leak_detection/bulk_leak_check_service.h"
#include "testing/gmock/include/gmock/gmock.h"
#if !BUILDFLAG(IS_ANDROID)
#include "chrome/browser/extensions/cws_info_service.h"
#include "chrome/browser/ui/safety_hub/password_status_check_service.h"
#include "chrome/browser/ui/safety_hub/safety_hub_hats_service.h"
#include "chrome/test/base/testing_profile.h"
#include "extensions/common/extension_urls.h"
#include "extensions/common/manifest.h"
#endif
namespace safety_hub_test_util {
#if !BUILDFLAG(IS_ANDROID)
class MockCWSInfoService : public extensions::CWSInfoService { … };
void UpdatePasswordCheckServiceAsync(
PasswordStatusCheckService* password_service);
void RunUntilPasswordCheckCompleted(Profile* profile);
std::unique_ptr<testing::NiceMock<MockCWSInfoService>> GetMockCWSInfoService(
Profile* profile,
bool with_calls = true);
std::unique_ptr<testing::NiceMock<MockCWSInfoService>>
GetMockCWSInfoServiceNoTriggers(Profile* profile);
void AddExtension(
const std::string& name,
extensions::mojom::ManifestLocation location,
Profile* profile,
std::string update_url = extension_urls::kChromeWebstoreUpdateURL);
void CreateMockExtensions(TestingProfile* profile);
void CleanAllMockExtensions(Profile* profile);
extensions::CWSInfoService::CWSInfo GetCWSInfoNoTrigger();
void RemoveExtension(const std::string& name,
extensions::mojom::ManifestLocation location,
Profile* profile);
void AcknowledgeSafetyCheckExtensions(const std::string& name,
Profile* profile);
password_manager::BulkLeakCheckService* CreateAndUseBulkLeakCheckService(
signin::IdentityManager* identity_manager,
Profile* profile);
password_manager::PasswordForm MakeForm(std::u16string_view username,
std::u16string_view password,
std::string origin,
bool is_leaked = false);
#endif
void UpdateSafetyHubServiceAsync(SafetyHubService* service);
void UpdateUnusedSitePermissionsServiceAsync(
UnusedSitePermissionsService* service);
bool IsUrlInSettingsList(ContentSettingsForOneType content_settings, GURL url);
void GenerateSafetyHubMenuNotification(Profile* profile);
}
#endif