Closed Bug 872328 Opened 7 years ago Closed 7 years ago

Closing last private tab can result in an extra about:home tab being added

Categories

(Firefox for Android :: General, defect)

All
Android
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 24
Tracking Status
firefox22 --- verified
firefox23 --- verified
firefox24 --- verified

People

(Reporter: bnicholson, Assigned: bnicholson)

Details

Attachments

(1 file)

STR:
1) Open a private tab
2) Close all non-private tabs
3) Open a new non-private tab
4) Select the private tab, then close it

When we close the last private tab and look for a non-private tab to select, our code currently assumes that the last tab is private and skips over it.
Comment on attachment 749592 [details] [diff] [review]
Don't skip the last tab when looking for a non-private tab

Could this be put into getPreviousTabFrom ?
Attachment #749592 - Flags: review?(mark.finkle) → review+
(In reply to Mark Finkle (:mfinkle) from comment #2)
> Comment on attachment 749592 [details] [diff] [review]
> Don't skip the last tab when looking for a non-private tab
> 
> Could this be put into getPreviousTabFrom ?

We could, but we'd have to change some things around. Normally, the tab given to getPreviousTabFrom()/getNextTabFrom() is the one we're about to close, so it makes sense to skip it. This case is different since we're starting from the end of the tabs list, which means we aren't necessarily starting from the tab that's currently selected.
Comment on attachment 749592 [details] [diff] [review]
Don't skip the last tab when looking for a non-private tab

[Approval Request Comment]
Bug caused by (feature/regressing bug #): bug 835022
User impact if declined: closing last private tab may create an extra about:home tab
Testing completed (on m-c, etc.): locally
Risk to taking this patch (and alternatives if risky): very low
String or IDL/UUID changes made by this patch: none
Attachment #749592 - Flags: approval-mozilla-beta?
Attachment #749592 - Flags: approval-mozilla-aurora?
https://hg.mozilla.org/mozilla-central/rev/af67b83ca10a
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 24
Comment on attachment 749592 [details] [diff] [review]
Don't skip the last tab when looking for a non-private tab

Adding qawanted,verifyme once this lands.Please land by Monday for this to make it into next beta
Attachment #749592 - Flags: approval-mozilla-beta?
Attachment #749592 - Flags: approval-mozilla-beta+
Attachment #749592 - Flags: approval-mozilla-aurora?
Attachment #749592 - Flags: approval-mozilla-aurora+
Status: RESOLVED → VERIFIED
Keywords: qawanted
Verified fixed on:
-Build: Firefox for Android 22 Beta 2
-Device: Samsung Galaxy S2
-OS: Android 4.0.3
Removing verifyme flag since it was verified by Teodora in comment 9.
Keywords: verifyme
You need to log in before you can comment on or make changes to this bug.