From 87eaea8536e49a039f5e0f5dc11b6578d05a98fb Mon Sep 17 00:00:00 2001 From: brave-builds Date: Wed, 9 Oct 2024 23:06:16 +0000 Subject: [PATCH] Uplift of #25912 (squashed) to beta --- .../components/live_caption/caption_util.cc | 20 +++++++++++++++++++ test/filters/browser_tests-windows.filter | 1 - test/filters/browser_tests.filter | 5 +++++ 3 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 chromium_src/components/live_caption/caption_util.cc diff --git a/chromium_src/components/live_caption/caption_util.cc b/chromium_src/components/live_caption/caption_util.cc new file mode 100644 index 000000000000..25c8dd0a099f --- /dev/null +++ b/chromium_src/components/live_caption/caption_util.cc @@ -0,0 +1,20 @@ +/* Copyright (c) 2024 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/live_caption/caption_util.h" + +#define IsLiveCaptionFeatureSupported IsLiveCaptionFeatureSupported_ChromiumImpl + +#include "src/components/live_caption/caption_util.cc" + +#undef IsLiveCaptionFeatureSupported + +namespace captions { + +bool IsLiveCaptionFeatureSupported() { + return false; +} + +} // namespace captions diff --git a/test/filters/browser_tests-windows.filter b/test/filters/browser_tests-windows.filter index 97d66ffdd8ae..871136c797e4 100644 --- a/test/filters/browser_tests-windows.filter +++ b/test/filters/browser_tests-windows.filter @@ -88,7 +88,6 @@ -InterstitialUITest.* -IsolatedAppBrowserServiceWorkerPushTest.ServiceWorkerPartitionedWhenWakingUpDuetoPushNotification -KnownInterceptionDisclosureUITest.* --LiveCaptionControllerTest.* -LocalePolicyTest.* -MediaSessionPictureInPictureWindowControllerBrowserTest.* -MediaSessionVideoPictureInPictureWindowControllerBrowserTest.* diff --git a/test/filters/browser_tests.filter b/test/filters/browser_tests.filter index e06faf07970c..3acbd1d27553 100644 --- a/test/filters/browser_tests.filter +++ b/test/filters/browser_tests.filter @@ -1802,6 +1802,11 @@ -ChromeLabsMultipleFeaturesUiTest.InvokeUi_default -ChromeLabsUiTest.InvokeUi_default +# These tests fail because we stub captions::IsLiveCaptionFeatureSuppported to +# always return false +-LiveCaptionAutomaticLanguageDownloadTest.* +-LiveCaptionControllerTest.* + # Tests below this point have not been diagnosed or had issues created yet. -_/WebrtcLoggingPrivateApiStartEventLoggingTestFeatureAndPolicyEnabled.* -AccessCodeCastHandlerBrowserTest.*