Test: Update HDR GL tone-map fallback string.

PiperOrigin-RevId: 568920716
This commit is contained in:
huangdarwin 2023-09-27 12:02:28 -07:00 committed by Copybara-Service
parent 77ba0292ad
commit 1df2210cf4

View File

@ -271,11 +271,9 @@ public final class HdrEditingTest {
if (exception.getCause() != null if (exception.getCause() != null
&& (Objects.equals( && (Objects.equals(
exception.getCause().getMessage(), exception.getCause().getMessage(),
"Tone-mapping HDR is not supported on this device.") "Decoding HDR is not supported on this device.")
|| Objects.equals( || Objects.equals(
exception.getCause().getMessage(), exception.getCause().getMessage(), "Device lacks YUV extension support."))) {
"Tone-mapping requested but not supported by the decoder."))) {
// Expected on devices without a tone-mapping plugin for the this codec.
return; return;
} }
throw exception; throw exception;
@ -303,7 +301,6 @@ public final class HdrEditingTest {
return; return;
} }
AtomicBoolean isFallbackListenerInvoked = new AtomicBoolean();
AtomicBoolean isToneMappingFallbackApplied = new AtomicBoolean(); AtomicBoolean isToneMappingFallbackApplied = new AtomicBoolean();
Transformer transformer = Transformer transformer =
new Transformer.Builder(context) new Transformer.Builder(context)
@ -314,7 +311,6 @@ public final class HdrEditingTest {
MediaItem inputMediaItem, MediaItem inputMediaItem,
TransformationRequest originalTransformationRequest, TransformationRequest originalTransformationRequest,
TransformationRequest fallbackTransformationRequest) { TransformationRequest fallbackTransformationRequest) {
isFallbackListenerInvoked.set(true);
assertThat(originalTransformationRequest.hdrMode).isEqualTo(HDR_MODE_KEEP_HDR); assertThat(originalTransformationRequest.hdrMode).isEqualTo(HDR_MODE_KEEP_HDR);
isToneMappingFallbackApplied.set( isToneMappingFallbackApplied.set(
fallbackTransformationRequest.hdrMode fallbackTransformationRequest.hdrMode
@ -337,11 +333,9 @@ public final class HdrEditingTest {
if (exception.getCause() != null if (exception.getCause() != null
&& (Objects.equals( && (Objects.equals(
exception.getCause().getMessage(), exception.getCause().getMessage(),
"Tone-mapping HDR is not supported on this device.") "Decoding HDR is not supported on this device.")
|| Objects.equals( || Objects.equals(
exception.getCause().getMessage(), exception.getCause().getMessage(), "Device lacks YUV extension support."))) {
"Tone-mapping requested but not supported by the decoder."))) {
// Expected on devices without a tone-mapping plugin for this codec.
return; return;
} }
throw exception; throw exception;