Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci][video_player_android][camera_android_camerax] Manual roll and fix tests #8391

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ci/flutter_master.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
29a6c648ca4d2b813a6787644fdfe20421a2570a
4b23b8182888d5d94645d8f97cdcc79800e44a9a
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void createSurfaceProducer_setsExpectedSurfaceProducerCallback() {
TextureRegistry.SurfaceProducer.Callback callback = callbackCaptor.getValue();

// Verify callback's onSurfaceDestroyed invalidates SurfaceRequest.
callback.onSurfaceDestroyed();
simulateSurfaceDestruction(callback);
verify(mockSurfaceRequest).invalidate();

reset(mockSurfaceRequest);
Expand Down Expand Up @@ -262,4 +262,12 @@ public void setTargetRotation_makesCallToSetTargetRotation() {

verify(mockPreview).setTargetRotation(targetRotation);
}

// TODO(bparrishMines): Replace with inline calls to onSurfaceCleanup once available on stable;
// see https://github.com/flutter/flutter/issues/16125. This separate method only exists to scope
// the suppression.
@SuppressWarnings({"deprecation", "removal"})
void simulateSurfaceDestruction(TextureRegistry.SurfaceProducer.Callback producerLifecycle) {
producerLifecycle.onSurfaceDestroyed();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public void onSurfaceProducerDestroyedAndAvailableReleasesAndThenRecreatesAndRes
when(mockExoPlayer.getPlaybackParameters()).thenReturn(new PlaybackParameters(2.5f));

TextureRegistry.SurfaceProducer.Callback producerLifecycle = callbackCaptor.getValue();
producerLifecycle.onSurfaceDestroyed();
simulateSurfaceDestruction(producerLifecycle);

verify(mockExoPlayer).release();

Expand All @@ -206,7 +206,7 @@ public void onSurfaceProducerDestroyedDoesNotStopOrPauseVideo() {

verify(mockProducer).setCallback(callbackCaptor.capture());
TextureRegistry.SurfaceProducer.Callback producerLifecycle = callbackCaptor.getValue();
producerLifecycle.onSurfaceDestroyed();
simulateSurfaceDestruction(producerLifecycle);

verify(mockExoPlayer, never()).stop();
verify(mockExoPlayer, never()).pause();
Expand Down Expand Up @@ -256,7 +256,7 @@ public void onSurfaceAvailableDoesNotSendInitializeEventAgain() {
TextureRegistry.SurfaceProducer.Callback producerLifecycle = callbackCaptor.getValue();

// Trigger destroyed/available.
producerLifecycle.onSurfaceDestroyed();
simulateSurfaceDestruction(producerLifecycle);
producerLifecycle.onSurfaceAvailable();

// Initial listener, and the new one from the resume.
Expand Down Expand Up @@ -301,4 +301,12 @@ public void disposeReleasesExoPlayerBeforeTexture() {
inOrder.verify(mockExoPlayer).release();
inOrder.verify(mockProducer).release();
}

// TODO(bparrishMines): Replace with inline calls to onSurfaceCleanup once available on stable;
// see https://github.com/flutter/flutter/issues/16125. This separate method only exists to scope
// the suppression.
@SuppressWarnings({"deprecation", "removal"})
void simulateSurfaceDestruction(TextureRegistry.SurfaceProducer.Callback producerLifecycle) {
producerLifecycle.onSurfaceDestroyed();
}
}
Loading