From 95b9477e8c30099eab06ccb2c24c7c25c018cf64 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Tue, 22 Oct 2024 16:23:35 -0700 Subject: [PATCH 01/10] Add diff --- .../example/integration_test/video_player_test.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index fc69114c63f..266e4cce3b3 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -98,7 +98,9 @@ void main() { final Duration pausedDuration = await player.getPosition(textureId); await tester.pumpAndSettle(_playDuration); - expect(await player.getPosition(textureId), pausedDuration); + // TODO(camsim99): Implement reliable way to tell when pausing completes + // to check for exact pausedDuration. + expect(await player.getPosition(textureId), inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 0.01)); await player.dispose(textureId); }); From e27fe442ce7af740172dff02850e354bf0d03ba8 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Tue, 22 Oct 2024 16:31:11 -0700 Subject: [PATCH 02/10] Bump diff --- .../example/integration_test/video_player_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index 266e4cce3b3..8e614730672 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -100,7 +100,7 @@ void main() { // TODO(camsim99): Implement reliable way to tell when pausing completes // to check for exact pausedDuration. - expect(await player.getPosition(textureId), inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 0.01)); + expect(await player.getPosition(textureId), inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 0.02)); await player.dispose(textureId); }); From 13bb6cf5efceae46b1d8a94b1e1fabc847a11f7e Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 09:03:02 -0700 Subject: [PATCH 03/10] Fix units --- .../example/integration_test/video_player_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index 8e614730672..373b5f6c324 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -100,7 +100,7 @@ void main() { // TODO(camsim99): Implement reliable way to tell when pausing completes // to check for exact pausedDuration. - expect(await player.getPosition(textureId), inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 0.02)); + expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 0.02)); await player.dispose(textureId); }); From 1898dbaf73d1cdad1516316978399331bb84a2d2 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 09:26:54 -0700 Subject: [PATCH 04/10] Change diff from s to ms --- .../example/integration_test/video_player_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index 373b5f6c324..b5e48e1d608 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -100,7 +100,7 @@ void main() { // TODO(camsim99): Implement reliable way to tell when pausing completes // to check for exact pausedDuration. - expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 0.02)); + expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 100)); await player.dispose(textureId); }); From b89f0f90c6eb9a3e597325e9478522684ee7e5d5 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 09:43:43 -0700 Subject: [PATCH 05/10] Increase diff --- .../example/integration_test/video_player_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index b5e48e1d608..d163720f57c 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -100,7 +100,7 @@ void main() { // TODO(camsim99): Implement reliable way to tell when pausing completes // to check for exact pausedDuration. - expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 100)); + expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 200)); await player.dispose(textureId); }); From 27eaff21e1deffa01086540f214d13aad1f13e53 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 10:14:16 -0700 Subject: [PATCH 06/10] Increase diff --- .../example/integration_test/video_player_test.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index d163720f57c..ff34e1f6695 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -100,7 +100,7 @@ void main() { // TODO(camsim99): Implement reliable way to tell when pausing completes // to check for exact pausedDuration. - expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 200)); + expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 500)); await player.dispose(textureId); }); From da0efebe4cdc585547d595724fe88251e1893d76 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 11:33:08 -0700 Subject: [PATCH 07/10] Bump version --- packages/video_player/video_player_android/CHANGELOG.md | 4 ++++ packages/video_player/video_player_android/pubspec.yaml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/CHANGELOG.md b/packages/video_player/video_player_android/CHANGELOG.md index 8951fff9f51..197dc4a2381 100644 --- a/packages/video_player/video_player_android/CHANGELOG.md +++ b/packages/video_player/video_player_android/CHANGELOG.md @@ -1,3 +1,7 @@ +## 2.7.16 + +* Modifies `can pause` integration test to account for asynchronous pausing. + ## 2.7.15 * Changes the rotation correction calculation for Android API 29+ to use diff --git a/packages/video_player/video_player_android/pubspec.yaml b/packages/video_player/video_player_android/pubspec.yaml index eaaec350813..ababc4aca4e 100644 --- a/packages/video_player/video_player_android/pubspec.yaml +++ b/packages/video_player/video_player_android/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_android description: Android implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.7.15 +version: 2.7.16 environment: sdk: ^3.5.0 From 280fef63a80042d6596e5f25a0d549e07ff88c80 Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 12:41:12 -0700 Subject: [PATCH 08/10] Add back missing pump and settle --- .../example/integration_test/video_player_test.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index ff34e1f6695..cc32f77a78f 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -95,12 +95,13 @@ void main() { await tester.pumpAndSettle(_playDuration); await player.pause(textureId); + await tester.pumpAndSettle(_playDuration); final Duration pausedDuration = await player.getPosition(textureId); await tester.pumpAndSettle(_playDuration); // TODO(camsim99): Implement reliable way to tell when pausing completes // to check for exact pausedDuration. - expect((await player.getPosition(textureId)).inMilliseconds, inInclusiveRange(pausedDuration.inMilliseconds, pausedDuration.inMilliseconds + 500)); + expect(await player.getPosition(textureId), pausedDuration); await player.dispose(textureId); }); From b5215c74bfec5aa2e61c90a0dc65157b3e6812bd Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 12:43:34 -0700 Subject: [PATCH 09/10] undo changelog and versioning --- packages/video_player/video_player_android/CHANGELOG.md | 4 ---- packages/video_player/video_player_android/pubspec.yaml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/video_player/video_player_android/CHANGELOG.md b/packages/video_player/video_player_android/CHANGELOG.md index 197dc4a2381..8951fff9f51 100644 --- a/packages/video_player/video_player_android/CHANGELOG.md +++ b/packages/video_player/video_player_android/CHANGELOG.md @@ -1,7 +1,3 @@ -## 2.7.16 - -* Modifies `can pause` integration test to account for asynchronous pausing. - ## 2.7.15 * Changes the rotation correction calculation for Android API 29+ to use diff --git a/packages/video_player/video_player_android/pubspec.yaml b/packages/video_player/video_player_android/pubspec.yaml index ababc4aca4e..eaaec350813 100644 --- a/packages/video_player/video_player_android/pubspec.yaml +++ b/packages/video_player/video_player_android/pubspec.yaml @@ -2,7 +2,7 @@ name: video_player_android description: Android implementation of the video_player plugin. repository: https://github.com/flutter/packages/tree/main/packages/video_player/video_player_android issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+label%3A%22p%3A+video_player%22 -version: 2.7.16 +version: 2.7.15 environment: sdk: ^3.5.0 From 9de058acb500b08d5edfcce26019a9cca5cf7d1e Mon Sep 17 00:00:00 2001 From: Camille Simon Date: Wed, 23 Oct 2024 13:17:18 -0700 Subject: [PATCH 10/10] undo todo --- .../example/integration_test/video_player_test.dart | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart index cc32f77a78f..f347214b9e7 100644 --- a/packages/video_player/video_player_android/example/integration_test/video_player_test.dart +++ b/packages/video_player/video_player_android/example/integration_test/video_player_test.dart @@ -99,8 +99,6 @@ void main() { final Duration pausedDuration = await player.getPosition(textureId); await tester.pumpAndSettle(_playDuration); - // TODO(camsim99): Implement reliable way to tell when pausing completes - // to check for exact pausedDuration. expect(await player.getPosition(textureId), pausedDuration); await player.dispose(textureId); });