Skip to content

Bug 2073095 - fix extension private browsing test. - #370

Open
pollym wants to merge 1 commit into
mozilla-firefox:autolandfrom
pollym:fix-extension-test
Open

pollym wants to merge 1 commit into
mozilla-firefox:autolandfrom
pollym:fix-extension-test

Conversation

@pollym

@pollym pollym commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Previously this relied on assets only visible to debug builds, so i've moved these to a place where other testable builds can also use them.

Try is running here


Lando: link
Bugzilla: bug 2073095

⚠️ This pull request has 2 warnings.
🚫 This pull request has 1 blocker.

@github-actions

Copy link
Copy Markdown
Contributor

View this pull request in Lando to land it once approved.

@lando-web
lando-web Bot requested a review from a team September 28, 2026 08:41
@mozilla-code-review

Copy link
Copy Markdown

No new issues detected. This pull request is 🆗

@mozilla-code-review

Copy link
Copy Markdown

No new issues detected. This pull request is 🆗

@pollym
pollym force-pushed the fix-extension-test branch from 50ba977 to ee7547d Compare October 1, 2026 10:13
@pollym

pollym commented Oct 1, 2026

Copy link
Copy Markdown
Contributor Author

rebased and retried here

@segunfamisa segunfamisa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks Polly.

Please, could you help with a bit of explanation for my mind to grok the idea here?

I am approving nonetheless, so that I'm not blocking the patch.

Comment on lines +211 to +221
// Web extensions that only the UI tests install.
// They have to live in the app under test rather than the test apk.
// Added to the debug and other test builds, so they never reach a shipping build.
debug {
assets.srcDirs += ['src/uiTest/assets']
}
if (project.hasProperty("testBuildType")) {
named(project.property("testBuildType")) {
assets.srcDirs += ['src/uiTest/assets']
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not sure I fully understand why we need a new source set for this - and more importantly, I think we may need more info about why and how this change helps. Especially for 2028 Segun who's 100% gonna forget ever reading this PR 😂

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think what I'm struggling with is: I am sure there's a reason, but it's not obvious to me why androidTest is not sufficient or desirable for this use-case.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

oh that's fair, thanks! i guess i could put them in androidTest/assets as a top level thing, not sure why i didn't think of that.
I was thinking everything existing was bucketed by build variant but i missed this dir.
i will give it a go!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't know if it would work or not btw - I was just wondering tbh.

I think if we are running androidTest<Variant>, it should still fallback and pick resources and stuff from androidTest

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i've pushed a change based on your suggestion - do you prefer this?
i don't really think there is a perfect place for these assets tbh: they are a bit unusual in that they are assets required only by the ui tests, and yet they need to live in the app apk to be picked up as web extensions.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

reworded the comment a bit too, lmk if that makes sense. also happy to chat more about it :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

(sorry, push failed the first time for some reason! should be good now!)

Previously this relied on assets only visible to debug builds, so i've moved these to a place where other testable build types can also use them (eg. nightly).
@pollym
pollym force-pushed the fix-extension-test branch from ee7547d to ca390ea Compare October 5, 2026 14:39

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants