fix(player): respect visible chrome on back

This commit is contained in:
edde746
2026-07-11 17:38:22 +02:00
parent 3a982c2a7a
commit 4443b76145
13 changed files with 424 additions and 52 deletions
@@ -119,6 +119,32 @@ void main() {
expect(controller.takeFocusTarget(), isNull);
});
test('hide keeps controls presented until the opacity animation completes', () {
final controller = PlayerChromeController();
addTearDown(controller.dispose);
controller.hide();
expect(controller.controlsVisible, isFalse);
expect(controller.controlsPresented, isTrue);
controller.markControlsHidden();
expect(controller.controlsPresented, isFalse);
});
test('a stale fade-out completion cannot hide controls that were shown again', () {
final controller = PlayerChromeController();
addTearDown(controller.dispose);
controller.hide();
controller.show();
controller.markControlsHidden();
expect(controller.controlsVisible, isTrue);
expect(controller.controlsPresented, isTrue);
});
test('silent release removes hold without notifying listeners', () {
final controller = PlayerChromeController();
addTearDown(controller.dispose);