)]}'
{
  "commit": "cde74b6e1a8d9aa028dfd6daf84c4460345e83ca",
  "tree": "3f596ad8604b0ff1bfb2a7040c18ed633c391f39",
  "parents": [
    "89db44f60c96dcb7dae7b3e04b9f6f3dc526bd47"
  ],
  "author": {
    "name": "victogomez-cs",
    "email": "victor.orozco@cloudsufi.com",
    "time": "Wed Sep 09 15:42:24 2026 -0600"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Wed Sep 09 21:42:24 2026 +0000"
  },
  "message": "[image_picker] Add native tests for photo-library access and UIImagePicker completion (#12540)\n\nStacked on https://github.com/flutter/packages/pull/12539.\r\n\r\nAdds native unit tests for previously untested paths in `FLTImagePickerPlugin.m` (photo-library authorization, `UIImagePicker` launch, and `didFinishPickingMediaWithInfo:`) before the Objective-C → Swift migration. Production code is unchanged.\r\n\r\nThis is a tests-only change, so it does not bump the package version or CHANGELOG.\r\n\r\n`ImagePickerPluginTests` go from 52 tests to 70 tests (+18).\r\n\r\n### New test cases\r\n\r\n**Photo-library access:**\r\n- `testLaunchUIImagePickerGalleryWithoutFullMetadataSkipsAuthorization` — gallery without full metadata skips the authorization check\r\n- `testPhotoAccessDeniedReturnsError` — denied photo access returns an error\r\n- `testPhotoAccessRestrictedReturnsError` — restricted photo access returns an error\r\n- `testPhotoAccessAuthorizedShowsLibrary` — authorized access presents the library\r\n- `testPhotoAccessNotDeterminedGrantedShowsLibrary` — prompt granted presents the library\r\n- `testPhotoAccessNotDeterminedDeniedReturnsError` — prompt denied returns an error\r\n- `testPhotoAccessLimitedReturnsDeniedError` — Limited access falls through to denied\r\n- `testPhotoAccessUnknownStatusTreatedAsDenied` — unknown status is treated as denied\r\n\r\n**`launchUIImagePickerWithSource:`:**\r\n- `testLaunchUIImagePickerInvalidSourceReturnsError` — an invalid source returns an error\r\n- `testLaunchUIImagePickerSetsImageAndVideoMediaTypes` — image/video media types and duration are set on the picker\r\n\r\n**`imagePickerController:didFinishPickingMediaWithInfo:`:**\r\n- `testImagePickerDidFinishPickingOriginalImage` — original image is saved\r\n- `testImagePickerDidFinishPickingPrefersEditedImage` — edited image is preferred over original\r\n- `testImagePickerDidFinishPickingScalesImage` — the image is scaled when requested\r\n- `testImagePickerDidFinishPickingWithFullMetadataAsset` — full-metadata path uses `PHImageManager` when an asset is present\r\n- `testImagePickerDidFinishPickingFullMetadataWithoutAsset` — full metadata without an asset still completes\r\n- `testImagePickerDidFinishPickingVideo` — video is copied successfully\r\n- `testImagePickerDidFinishPickingVideoCopyFailure` — a video copy failure is reported\r\n- `testImagePickerDidFinishPickingIgnoredWhenNoCallContext` — no `callContext` is a no-op\r\n\r\nThird part of `image_picker_ios` coverage backfill before the Obj-C → Swift migration for https://github.com/flutter/flutter/issues/119107\r\n\r\n## Pre-Review Checklist\r\n\r\n**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member\u0027s review for guidance on which automated comments should be addressed.\r\n\r\n[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e164a25f95fb641fd417b76de54f2b7dcfd350d4",
      "old_mode": 33188,
      "old_path": "packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.m",
      "new_id": "1c4defea213cdc625f0e65ba8f531c7f2124f93d",
      "new_mode": 33188,
      "new_path": "packages/image_picker/image_picker_ios/example/ios/RunnerTests/ImagePickerPluginTests.m"
    }
  ]
}
