Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Jan 10, 2026

Part of flutter/flutter#180787

Add some test parameterization.

Also, only two of the tests were using the StubWorkspace, so were actually integration testing my local Mac's ability to canLaunch URLs. Swap them all to use the stub.

◇ Test run started.
↳ Testing Library Version: 102 (arm64e-apple-macos13.0)
◇ Suite RunnerTests started.
◇ Test launch(url:isSuccessful:) started.
◇ Test launchInvalidUrlReturnsError() started.
◇ Test canLaunch(url:isSuccessful:) started.
◇ Passing 2 arguments url → "https://flutter.dev/", isSuccessful → true to launch(url:isSuccessful:)
◇ Passing 2 arguments url → "schemethatdoesnotexist://flutter.dev", isSuccessful → false to launch(url:isSuccessful:)
◇ Test canLaunchInvalidUrlReturnsError() started.
◇ Passing 2 arguments url → "https://flutter.dev/", isSuccessful → true to canLaunch(url:isSuccessful:)
◇ Passing 2 arguments url → "example://flutter.dev", isSuccessful → false to canLaunch(url:isSuccessful:)
​​✔ Test launchInvalidUrlReturnsError() passed after 0.001 seconds.
​✔ Test canLaunchInvalidUrlReturnsError() passed after 0.001 seconds.
✔ Test launch(url:isSuccessful:) passed after 0.030 seconds.
​✔ Test canLaunch(url:isSuccessful:) passed after 0.030 seconds.
✔ Suite RunnerTests passed after 0.030 seconds.
✔ Test run with 4 tests passed after 0.030 seconds.

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8693089115880026769/+/u/Run_package_tests/native_test/stdout

Pre-Review Checklist

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

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. 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's review for guidance on which automated comments should be addressed.

Footnotes

  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. 2 3

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully migrates the url_launcher_macos tests from XCTest to the new Swift Testing framework. The changes are well-executed, leveraging test parameterization to reduce boilerplate and combine related test cases. A significant improvement is the consistent use of StubWorkspace across all tests, converting what were previously integration tests into true unit tests. I've included one suggestion to further improve code reuse within the test suite.

@jmagman jmagman marked this pull request as ready for review January 10, 2026 05:57
@jmagman jmagman added the override: no changelog needed Override the check requiring CHANGELOG updates for most changes label Jan 14, 2026
@jmagman
Copy link
Member Author

jmagman commented Jan 14, 2026

Adding CHANGELOG override per #10761 (comment)

@jmagman jmagman added the autosubmit Merge PR when tree becomes green via auto submit App label Jan 14, 2026
@auto-submit auto-submit bot merged commit 98b0325 into flutter:main Jan 14, 2026
81 checks passed
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 14, 2026
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jan 14, 2026
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Jan 14, 2026
flutter/packages@eb9e1dc...98b0325

2026-01-14 [email protected] [url_launcher_macos] Migrate XCTest to
Swift Testing (flutter/packages#10763)
2026-01-14 [email protected] [path_provider_foundation] Migrate XCTest
to Swift Testing (flutter/packages#10761)
2026-01-13 [email protected] Roll Flutter from
d81cd3e to 793b0b8 (18 revisions) (flutter/packages#10784)
2026-01-13 [email protected] [google_fonts] Add
missing public API documentation (flutter/packages#10782)

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
patrickBillingsley pushed a commit to patrickBillingsley/flutter that referenced this pull request Jan 14, 2026
…r#180983)

flutter/packages@eb9e1dc...98b0325

2026-01-14 [email protected] [url_launcher_macos] Migrate XCTest to
Swift Testing (flutter/packages#10763)
2026-01-14 [email protected] [path_provider_foundation] Migrate XCTest
to Swift Testing (flutter/packages#10761)
2026-01-13 [email protected] Roll Flutter from
d81cd3e to 793b0b8 (18 revisions) (flutter/packages#10784)
2026-01-13 [email protected] [google_fonts] Add
missing public API documentation (flutter/packages#10782)

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
@jmagman jmagman deleted the url-launcher-macos-st branch January 15, 2026 00:10
ikramhasan pushed a commit to ikramhasan/flutter that referenced this pull request Jan 15, 2026
…r#180983)

flutter/packages@eb9e1dc...98b0325

2026-01-14 [email protected] [url_launcher_macos] Migrate XCTest to
Swift Testing (flutter/packages#10763)
2026-01-14 [email protected] [path_provider_foundation] Migrate XCTest
to Swift Testing (flutter/packages#10761)
2026-01-13 [email protected] Roll Flutter from
d81cd3e to 793b0b8 (18 revisions) (flutter/packages#10784)
2026-01-13 [email protected] [google_fonts] Add
missing public API documentation (flutter/packages#10782)

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 override: no changelog needed Override the check requiring CHANGELOG updates for most changes p: url_launcher platform-macos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants