Skip to content

Commit 90a4fa2

Browse files
committed
[camera_web] Add test for empty VideoConstraints serialization
Add integration test to verify that VideoConstraints.toMediaStreamConstraints() returns true when no constraints are provided, covering the Firefox Android compatibility fix.
1 parent 3fd8b2e commit 90a4fa2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/camera/camera_web/example/integration_test/camera_options_test.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,15 @@ void main() {
108108
);
109109
});
110110

111+
testWidgets('serializes to true when no constraints are provided',
112+
(WidgetTester tester) async {
113+
const VideoConstraints videoConstraints = VideoConstraints();
114+
expect(
115+
videoConstraints.toMediaStreamConstraints().dartify(),
116+
isTrue,
117+
);
118+
});
119+
111120
testWidgets('supports value equality', (WidgetTester tester) async {
112121
expect(
113122
VideoConstraints(

0 commit comments

Comments
 (0)