Skip to content

[camera_avfoundation] Tests backfilling - part 1 #8698

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

RobertOdrowaz
Copy link
Contributor

@RobertOdrowaz RobertOdrowaz commented Feb 25, 2025

Backfills tests for the CameraPlugin class as part of flutter/flutter#119109

There are 3 new test files:

  • CameraPluginCreateCameraTests contains tests for the createCamera(withName) method
  • CameraPluginInitializeCameraTests contains tests for the initializeCamera method
  • CameraPluginForwardingMethodTests contains tests for all methods that only forward to the FLTCam instance without any (or almost any for startVideoRecording) logic extracted to separate PR

I've also added minimumExposureOffset and maximumExposureOffset to FLTCam to make both easier to mock and more consistent. Before the CameraPlugin class used the CaptureDevice methods directly by accessing the captureDevice field of the FLTCam class.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-tests-backfilling branch 2 times, most recently from cead82f to 1ad685d Compare February 28, 2025 11:59
@RobertOdrowaz RobertOdrowaz marked this pull request as ready for review February 28, 2025 12:11
Copy link
Contributor

@hellohuanlin hellohuanlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didn't finish reviewing. can you split the PR into multiple smaller PRs so it's easier to review? thanks

@RobertOdrowaz RobertOdrowaz force-pushed the feature/camera-tests-backfilling branch from 1ad685d to 72edba6 Compare March 3, 2025 08:48
@RobertOdrowaz
Copy link
Contributor Author

@hellohuanlin thanks for the review. I extracted the forwarding method tests from this PR and resolved most of the comments

@RobertOdrowaz RobertOdrowaz added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 5, 2025
@auto-submit auto-submit bot merged commit abba683 into flutter:main Mar 5, 2025
82 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 5, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Mar 5, 2025
flutter/packages@9e4684e...abba683

2025-03-05 [email protected] [camera_avfoundation] Tests
backfilling - part 1 (flutter/packages#8698)
2025-03-04 [email protected]
[go_router_builder]: Fix `The argument type 'String?' can't be assigned
to the parameter type 'String' because 'String?' ` on path and query
params (flutter/packages#8737)
2025-03-04 [email protected] [video_player_android] Platform
view support (flutter/packages#8466)
2025-03-04 [email protected]
[webview_flutter_wkwebview] Fixes crash with nil `WKFrameInfo.request`
(flutter/packages#8766)
2025-03-03 [email protected] Manual roll Flutter from
842db35 to 04d3934 (4 revisions) (flutter/packages#8775)
2025-03-03 [email protected] Roll Flutter from
842db35 to 04d3934 (4 revisions) (flutter/packages#8774)
2025-03-03 [email protected] [flutter_plugin_android_lifecycle] Uses
flutter.compileSdkVersion, bumps minimum flutter version to 3.27
(flutter/packages#8760)
2025-03-03 [email protected] [google_sign_in] Add Android account name
field as optional (platform interface changes) (flutter/packages#8735)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App p: camera platform-ios platform-macos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants