Open Bug 1900831 Opened 6 months ago Updated 5 months ago

AppUiTestDelegate openNewForegroundTab sets the triggering principal unconditionally to a content principal derived from url being loaded

Categories

(GeckoView :: General, task, P2)

All
Android
task

Tracking

(Not tracked)

People

(Reporter: rpl, Unassigned, Mentored)

Details

We have noticed this while working on a mochitest-plain test case which needed to open a new tab in a test meant to run on both mobile and desktop build and we noticed that the test was hitting a failure due to AppUiTestDelegate openNewForegroundTab setting the triggering principal (derived from the url being loaded) unconditionally here:

That behavior doesn't match what GeckoView::LoadUri logic may be doing in an actual GeckoView-based app and setting the triggeringPrincipal unconditionally doesn't allow to mock test scenarios around loading a url in a GeckoView tabs where we expect the triggeringPrincipal to not be the same as the principal of the url being loaded.

This bug tracks looking into changes to AppTestUtils.openNewForegroundTab to allow to recreate those other test scenarios when used in mobile builds (e.g. allow to customize the triggering principal by passing additional parameters to the calls to that method may be one of the possible approaches).

Severity: -- → N/A
Priority: -- → P2
Mentor: bugzeeeeee
You need to log in before you can comment on or make changes to this bug.