Closed Bug 461755 Opened 16 years ago Closed 16 years ago

Error console should be cleared when leaving the private browsing mode

Categories

(Firefox :: Private Browsing, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 3.1b2

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

References

Details

(Keywords: privacy)

Attachments

(1 file, 2 obsolete files)

Based on email conversation with mconnor, we need to clear the error console when leaving the private browsing mode.

Patch forthcoming.
Attached patch Patch (v1) (obsolete) — Splinter Review
Patch plus a browser chrome test.
Attachment #344970 - Flags: review?(mconnor)
Comment on attachment 344970 [details] [diff] [review]
Patch (v1)

this is the wrong place to call this.  This would get called once for every window that's open, which doesn't make a lot of sense to me...

you should just call it in  _onPrivateBrowsingModeChanged right before we restore the previous session
Attachment #344970 - Flags: review?(mconnor) → review-
Attached patch Patch (v1.1) (obsolete) — Splinter Review
You're right.  I moved the code to the private browsing service, and updated the unit test to use the pref in this patch.
Attachment #344970 - Attachment is obsolete: true
Attachment #345460 - Flags: review?(mconnor)
Attachment #345460 - Flags: review?(mconnor) → review+
Comment on attachment 345460 [details] [diff] [review]
Patch (v1.1)

Please use an nsITimer, not a setTimeout, for unit tests.  setTimeout is... flaky, see sdwilsh since he's the de facto "guy to talk to about not using setTimeout"
Attached patch Patch (v1.2)Splinter Review
Updated the patch to use nsITimer inside the unit test.
Attachment #345460 - Attachment is obsolete: true
Attachment #345800 - Flags: review+
Flags: in-litmus?
Marcia: please note that the patch includes an automated test.  I'm not sure how useful a Litmus test can be here, because what this bug tries to cover is relatively a small issue which is easy to test automatically...

Anyway, I'm not clearing in-litmus? for now...
Flags: in-testsuite?
Whiteboard: [pb-ready-for-landing]
http://hg.mozilla.org/mozilla-central/rev/45a3004bee68
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Flags: in-testsuite? → in-testsuite+
Resolution: --- → FIXED
Whiteboard: [pb-ready-for-landing]
Target Milestone: --- → Firefox 3.1b2
Ehsan: I am noticing when testing today's build that the error console does not clear when I switch out of Private Browsing mode. My STR are:

1. Have a regular session going. Console errors appear.
2. Switch to PB mode. Console errors still there.
3. Switch out of PB mode. Console error still there.

I am not sure if you intend to clear the whole console or just any errors that are logged in the PB session.
(In reply to comment #8)
> Ehsan: I am noticing when testing today's build that the error console does not
> clear when I switch out of Private Browsing mode. My STR are:
> 
> 1. Have a regular session going. Console errors appear.
> 2. Switch to PB mode. Console errors still there.
> 3. Switch out of PB mode. Console error still there.

Oh, that's weird.  Can I ask what platform are you on?  Also, what happens if you close and re-open the console?  What if you manually clear the console?

> I am not sure if you intend to clear the whole console or just any errors that
> are logged in the PB session.

No, the whole console should be cleared (including errors logged both during and before the PB mode).
https://litmus.mozilla.org/show_test.cgi?id=7396 added to Litmus FFT. Even though we have an automated test for this, I have been seeing a little flakiness here (see Comment 8), so it won't hurt to have a manual test for this as well.
Flags: in-litmus? → in-litmus+
Depends on: 464918
verified fixed using Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b2pre) Gecko/20081118 Minefield/3.1b2pre and  Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081118 Minefield/3.1b2pre
Status: RESOLVED → VERIFIED
Mass moving of all Firefox::General private browsing bugs to Firefox::Private Browsing.
Component: General → Private Browsing
QA Contact: general → private.browsing
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: