Skip to content

Migrate BrowserTabViewModelTest and BrowserWebViewClientTest to Robolectric#7729

Merged
lmac012 merged 5 commits intodevelopfrom
fix/lukasz/android-tests-to-robolectric-migration
Feb 12, 2026
Merged

Migrate BrowserTabViewModelTest and BrowserWebViewClientTest to Robolectric#7729
lmac012 merged 5 commits intodevelopfrom
fix/lukasz/android-tests-to-robolectric-migration

Conversation

@lmac012
Copy link
Contributor

@lmac012 lmac012 commented Feb 12, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/task/1213242498673303

Description

Steps to test this PR

QA-optional

No UI changes


Note

Low Risk
Test-only migration with lint-baseline churn; minimal production impact, but there’s some risk of behavior drift due to Robolectric vs device/runtime differences.

Overview
Migrates BrowserTabViewModelTest and BrowserWebViewClientTest from instrumentation (androidTest) to Robolectric/JVM (test) by switching to AndroidJUnit4 + @Config(sdk = [34]), replacing InstrumentationRegistry usage with RuntimeEnvironment, and dropping @UiThreadTest/@SdkSuppress gating.

Adds a reusable ValueCaptorObserver test helper, and adjusts test setup to better match Robolectric behavior (e.g., explicitly populating MimeTypeMap mappings and making TestWebView report progress=100). The lint baseline is updated to reflect moved test file paths and to remove prior denylisted-API entries tied to the old instrumentation tests.

Written by Cursor Bugbot for commit cdfc264. This will update automatically on new commits. Configure here.

Copy link
Contributor Author

lmac012 commented Feb 12, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

@GerardPaligot GerardPaligot left a comment

Choose a reason for hiding this comment

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

LGTM, but the build is failing due to lint errors from our new rule regarding impl module usage within the app module.

@lmac012 lmac012 marked this pull request as ready for review February 12, 2026 21:47
@lmac012 lmac012 merged commit c1a8884 into develop Feb 12, 2026
14 checks passed
@lmac012 lmac012 deleted the fix/lukasz/android-tests-to-robolectric-migration branch February 12, 2026 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants