Closed Bug 463202 Opened 17 years ago Closed 17 years ago

Search engine box 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: flod, Assigned: ehsan.akhgari)

References

Details

(Keywords: privacy, verified1.9.1)

Attachments

(1 file, 2 obsolete files)

When you leave "private browsing" mode, the text in the search engine box should be cleared. Right now, if you search something using the search engine box in private mode, when the normal session is restored the text is not deleted.
OS: Mac OS X → All
Hardware: Macintosh → All
Assignee: nobody → ehsan.akhgari
Status: NEW → ASSIGNED
Target Milestone: --- → Firefox 3.1
Attached patch Patch (v1) (obsolete) — Splinter Review
One liner plus a unit test.
Attachment #346666 - Flags: review?(mconnor)
Attachment #346666 - Flags: review?(mconnor) → review-
Comment on attachment 346666 [details] [diff] [review] Patch (v1) You need to null check BrowserSearch.searchBar, since it will be null when the search bar is customized away.
Attached patch Patch (v1.1) (obsolete) — Splinter Review
(In reply to comment #2) > (From update of attachment 346666 [details] [diff] [review]) > You need to null check BrowserSearch.searchBar, since it will be null when the > search bar is customized away. Done.
Attachment #346666 - Attachment is obsolete: true
Attachment #346709 - Flags: review?(gavin.sharp)
Hmm, I suppose we don't have to worry about search bar history because form history in general is not being not being saved? I think we also want to be clearing undo history as we do in the sanitize case, though: http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js?mark=227#219 And actually, we can do both in one step by using searchbar.textbox.reset() instead of .value = "" and clear(). I could have sworn I'd fixed that sanitize code already...
Attached patch Patch (v1.2)Splinter Review
(In reply to comment #4) > Hmm, I suppose we don't have to worry about search bar history because form > history in general is not being not being saved? I think we also want to be > clearing undo history as we do in the sanitize case, though: > > http://mxr.mozilla.org/mozilla-central/source/browser/base/content/sanitize.js?mark=227#219 > > And actually, we can do both in one step by using searchbar.textbox.reset() > instead of .value = "" and clear(). Done. > I could have sworn I'd fixed that sanitize > code already... Check out bug 463474 :-)
Attachment #346709 - Attachment is obsolete: true
Attachment #346724 - Flags: review?(gavin.sharp)
Attachment #346709 - Flags: review?(gavin.sharp)
When bug 418874 is fixed, the comments in the test can be removed.
Blocks: 418874
Attachment #346724 - Flags: review?(gavin.sharp) → review+
Comment on attachment 346724 [details] [diff] [review] Patch (v1.2) >+ // leave private browsing mode >+ pb.privateBrowsingEnabled = false; >+ >+ is(searchBar.value, "", >+ "leaving the private browsing mode should clear the search bar"); >+ /* >+ XXXehsan: uncomment this code when bug 418874 is fixed. >+ can't use todo_is, because it would pass unexpectedly! >+ >+ is(searchBar.textbox.editor.transactionManager.numberOfUndoItems, 0, >+ "entering the private browsing mode should not reset the undo list of the searchbar control"); It's just a comment for now, but this should probably read: >+ "leaving the private browsing mode should not reset the undo list of the searchbar control");
Ah, thanks! Actually, it should read: "leaving the private browsing mode should reset the undo list of the searchbar control" ;-) Fixing upon landing.
Attachment #346724 - Flags: approval1.9.1b2+
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: Firefox 3.1 → Firefox 3.1b2
No longer blocks: 418874
Depends on: 418874
> I could have sworn I'd fixed that sanitize code already... Yeah, you asked me to put it in my patch for bug 409624! Not to worry, thanks for fixing Ehsan.
Keywords: privacy
verified fixed using Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081119 Minefield/3.1b2pre and Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1b2pre) Gecko/20081119 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: