Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 1b986fd

Browse files
committed
Fix method_channel_video_player_test.
Add rotationCorrection for equality check. Add another VideoEvent to test when rotationCorrection is set.
1 parent 45533c0 commit 1b986fd

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

packages/video_player/video_player_platform_interface/test/method_channel_video_player_test.dart

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,20 @@ void main() {
255255
}),
256256
(ByteData? data) {});
257257

258+
await _ambiguate(ServicesBinding.instance)
259+
?.defaultBinaryMessenger
260+
.handlePlatformMessage(
261+
"flutter.io/videoPlayer/videoEvents123",
262+
const StandardMethodCodec()
263+
.encodeSuccessEnvelope(<String, dynamic>{
264+
'event': 'initialized',
265+
'duration': 98765,
266+
'width': 1920,
267+
'height': 1080,
268+
'rotationCorrection': 3.14,
269+
}),
270+
(ByteData? data) {});
271+
258272
await _ambiguate(ServicesBinding.instance)
259273
?.defaultBinaryMessenger
260274
.handlePlatformMessage(
@@ -314,6 +328,13 @@ void main() {
314328
eventType: VideoEventType.initialized,
315329
duration: const Duration(milliseconds: 98765),
316330
size: const Size(1920, 1080),
331+
rotationCorrection: 0.0,
332+
),
333+
VideoEvent(
334+
eventType: VideoEventType.initialized,
335+
duration: const Duration(milliseconds: 98765),
336+
size: const Size(1920, 1080),
337+
rotationCorrection: 3.14,
317338
),
318339
VideoEvent(eventType: VideoEventType.completed),
319340
VideoEvent(

0 commit comments

Comments
 (0)