Skip to content

Commit 586c847

Browse files
creativecreatorormaybenotEgor
authored andcommitted
[video_player] Fix tests on master (flutter#3082)
The previous push removed a class used for testing in the video_player package. This PR fixes tests to use the new class.
1 parent b398a02 commit 586c847

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

packages/video_player/video_player/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.10.12+5
2+
3+
* Depend on `video_player_platform_interface` version that contains the new `TestHostVideoPlayerApi`
4+
in order for tests to pass using the latest dependency.
5+
16
## 0.10.12+4
27

38
* Keep handling deprecated Android v1 classes for backward compatibility.

packages/video_player/video_player/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Flutter plugin for displaying inline video with other Flutter
44
# 0.10.y+z is compatible with 1.0.0, if you land a breaking change bump
55
# the version to 2.0.0.
66
# See more details: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0
7-
version: 0.10.12+4
7+
version: 0.10.12+5
88
homepage: https://github.com/flutter/plugins/tree/master/packages/video_player/video_player
99

1010
flutter:
@@ -20,7 +20,7 @@ flutter:
2020

2121
dependencies:
2222
meta: ^1.0.5
23-
video_player_platform_interface: ^2.1.0
23+
video_player_platform_interface: ^2.2.0
2424
# The design on https://flutter.dev/go/federated-plugins was to leave
2525
# this constraint as "any". We cannot do it right now as it fails pub publish
2626
# validation, so we set a ^ constraint.

packages/video_player/video_player/test/video_player_test.dart

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,9 @@ void main() {
588588
});
589589
}
590590

591-
class FakeVideoPlayerPlatform extends VideoPlayerApiTest {
591+
class FakeVideoPlayerPlatform extends TestHostVideoPlayerApi {
592592
FakeVideoPlayerPlatform() {
593-
VideoPlayerApiTestSetup(this);
593+
TestHostVideoPlayerApi.setup(this);
594594
}
595595

596596
Completer<bool> initialized = Completer<bool>();
@@ -657,6 +657,11 @@ class FakeVideoPlayerPlatform extends VideoPlayerApiTest {
657657
calls.add('setVolume');
658658
}
659659

660+
@override
661+
void setPlaybackSpeed(PlaybackSpeedMessage arg) {
662+
// todo: implement as part of completing https://github.com/flutter/plugins/pull/3031
663+
}
664+
660665
@override
661666
void setMixWithOthers(MixWithOthersMessage arg) {
662667
calls.add('setMixWithOthers');

0 commit comments

Comments
 (0)