Closed Bug 1014323 Opened 10 years ago Closed 10 years ago

Under private mode, every new blank tab closed is recorded in Recent Closed Tabs entry

Categories

(Firefox :: Session Restore, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 33
Iteration:
33.2

People

(Reporter: yeukhon, Assigned: jmaccor1012)

Details

(Whiteboard: [good first bug][mentor=ttaubert][lang=js])

Attachments

(1 file, 2 obsolete files)

Open a private window, open new tab (CMD+T on Mac), close the new tab, check Recent Closed Tabs, the tab just closed is recorded in the list.

There is no point of keeping them. New blank private tab should have been treated as normal blank page about:blank.

Very minor problem.

Similar ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=581937
I seem to be inept with nightly, because I can not find the "Recent Closed Tabs" menu. Where is it?
Disregard previous comment.
Flags: firefox-backlog+
Attached patch Patch.diff (obsolete) — Splinter Review
I thought I'd take a stab at this to try to get familiar with contributing to FireFox. Was not sure who to assign the review to, so I just selected what was recommended by Bugzilla.
Attachment #8436415 - Flags: review?(gavin.sharp)
Comment on attachment 8436415 [details] [diff] [review]
Patch.diff

Review of attachment 8436415 [details] [diff] [review]:
-----------------------------------------------------------------

Hey Jacob, thanks for your patch! The fix itself looks great but we'll need to address some minors details in the test - although it already does all the right things. That's a very solid first contribution, thanks again :)

::: browser/components/sessionstore/test/browser.ini
@@ +191,5 @@
>  [browser_625016.js]
>  skip-if = os == "mac" || e10s
>  
>  [browser_911547.js]
> +[browser_1014323.js]

Please give it a more descriptive name like browser_about_privatebrowsing.js and insert it a little higher above.

::: browser/components/sessionstore/test/browser_1014323.js
@@ +5,5 @@
> +// Tests that an about:privatebrowsing tab with no history will not 
> +// be saved into session store and thus, it will not show up in 
> +// Recently Closed Tabs.
> +
> +function test() {

Please use add_task(), that makes it a lot easier to write asynchronous tests. Just take a look at the other (newer) tests for how to do that.

@@ +9,5 @@
> +function test() {
> +  waitForExplicitFinish();
> +
> +  gPrefService.setIntPref("browser.sessionstore.max_tabs_undo", 0);
> +  gPrefService.clearUserPref("browser.sessionstore.max_tabs_undo");

If you want to clear the list of closed tabs, please call .forgetClosedTab() until .getClosedTabCount() returns 0.

@@ +16,5 @@
> +
> +  var tab = gBrowser.addTab("about:privatebrowsing");
> +  var browser = gBrowser.getBrowserForTab(tab);
> +  browser.addEventListener("load", function() {
> +    browser.removeEventListener("load", arguments.callee, true);

You can use promiseBrowserLoaded() in a task to wait for a browser to load.
Attachment #8436415 - Flags: review?(gavin.sharp) → feedback+
OS: Mac OS X → All
Assignee: nobody → jmaccor93
Status: NEW → ASSIGNED
Whiteboard: [good first bug][mentor=ttaubert][lang=js]
Attached patch Patch2.diff (obsolete) — Splinter Review
Hey Tim, thanks for reviewing my patch. I've gone through your suggestions and have an updated patch attached. Thanks!
Attachment #8436415 - Attachment is obsolete: true
Attachment #8436533 - Flags: review?(ttaubert)
Comment on attachment 8436533 [details] [diff] [review]
Patch2.diff

Review of attachment 8436533 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, that looks great! r=ttaubert with the test renamed. Please attach the new version of the patch and add the "checkin-needed" keyword. And don't forget to set a proper patch description with bug number and reviewer name :)

::: browser/components/sessionstore/test/browser.ini
@@ +61,1 @@
>  [browser_aboutSessionRestore.js]

Sorry, I should have looked at the list before. I think we should name it browser_aboutPrivateBrowsing.js, like we did with the test for about:sessionrestore.
Attachment #8436533 - Flags: review?(ttaubert) → review+
Attached patch Patch2.diffSplinter Review
Thanks Tim!
Attachment #8436533 - Attachment is obsolete: true
Keywords: checkin-needed
https://hg.mozilla.org/integration/fx-team/rev/f4d6559cc232

This is now on the fx-team branch and should be merged to mozilla-central today or tomorrow and then be in tomorrow's (or the day after that) Nightly.
Keywords: checkin-needed
Jacob, thanks for your contribution again! If you're interested in helping with some more sessionstore stuff please feel free to talk to me on IRC or over email. We have a few other mentored bugs that just wait for someone to show up! :) There are of course lots of other mentored bugs all over Firefox if you're interested in other areas of code. Bugs Ahoy[1] is a good resource.

[1] http://www.joshmatthews.net/bugsahoy/
https://hg.mozilla.org/mozilla-central/rev/f4d6559cc232
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Whiteboard: [good first bug][mentor=ttaubert][lang=js] → [good first bug][mentor=ttaubert][lang=js] p=0 s=33.1 [qa?]
Iteration: --- → 33.2
QA Whiteboard: [qa?]
Whiteboard: [good first bug][mentor=ttaubert][lang=js] p=0 s=33.1 [qa?] → [good first bug][mentor=ttaubert][lang=js]
QA Whiteboard: [qa?] → [qa+]
QA Contact: catalin.varga
Verified as fixed using the following environment:

FF Nightly 33
Build Id:20140624030200
OS: Win 7 x64, Mac Os 10.7.5, Ubuntu 13.04 x64
Status: RESOLVED → VERIFIED
QA Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: