diff --git a/chromium_src/components/page_image_service/image_service_consent_helper.cc b/chromium_src/components/page_image_service/image_service_consent_helper.cc new file mode 100644 index 00000000000..aef1c20390f --- /dev/null +++ b/chromium_src/components/page_image_service/image_service_consent_helper.cc @@ -0,0 +1,19 @@ +/* Copyright (c) 2025 The Brave Authors. All rights reserved. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this file, + * You can obtain one at https://mozilla.org/MPL/2.0/. */ + +#include "components/sync/service/sync_service_utils.h" + +namespace syncer { +bool RejectConsent() { + return true; +} +} // namespace syncer + +#define GetUploadToGoogleState(...) \ + RejectConsent() || syncer::GetUploadToGoogleState(__VA_ARGS__) + +#include + +#undef GetUploadToGoogleState diff --git a/test/filters/components_unittests.filter b/test/filters/components_unittests.filter index f33b8490e4a..72a5bb39f8d 100644 --- a/test/filters/components_unittests.filter +++ b/test/filters/components_unittests.filter @@ -90,6 +90,11 @@ # switches::kSyncEnableBookmarksInTransportMode -InitialAccountBookmarkDeduplicatorTest.* +# These tests fail because we patch ImageServiceConsentHelper::GetConsentStatus +# to return false always +-ImageServiceConsentHelperTest.* +-ImageServiceImplTest.* + # Tests below this point have not been diagnosed or had issues created yet. -AccountInvestigatorTest.* -AccountReconcilorDiceTest.*