Closed Bug 1581661 Opened 5 years ago Closed 5 years ago

TestRunnerActivity's onNewTab doesn't set the new tab correctly

Categories

(GeckoView :: General, task, P3)

Unspecified
All

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1616625

People

(Reporter: agi, Unassigned, Mentored)

References

Details

While looking at https://bugzilla.mozilla.org/show_bug.cgi?id=1574917 we noticed that the impl of onNewTab in TestRunnerActivity is not correct: https://searchfox.org/mozilla-central/rev/7ed8e2d3d1d7a1464ba42763a33fd2e60efcaedc/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/TestRunnerActivity.java#210

onNewTab is supposed to create a "foreground" tab which means that the current tab is replaced with the new tab. In that case we need to update the state of the activity to reflect this fact, e.g. mSession should be set to the new sessoin, we need to call mView.setSession and we need to move the old mSession to the background list.

This is probably not high priority as the tests don't seem to care about this.

The part of the tabs API that sets, queries and observes changes to tab "activeness" (i.e. whether a tab is the "current tab") is currently non-functional - bug 1565536.

Depending on how that bug is fixed, this bug might become more relevant (i.e. if the truth of activeness relies on the embedder, then the embedder needs to correctly maintain which window is in the foreground).

This was fixed in Bug 1616625.

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.