Closed Bug 1428529 Opened 7 years ago Closed 7 years ago

"Clear Recent History" stops working

Categories

(Firefox :: General, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
Firefox 59
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- unaffected
firefox58 --- unaffected
firefox59 --- verified

People

(Reporter: alice0775, Assigned: myk)

References

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

Reproducible: 100% Steps To Reproduce: 1. Open "Clear Recent History" dialog (Ctrl + Shift + Del) Actual Results: "Clear Now" Button do nothing All checkbox are unexpectedly unchecked in the detail pane after expand detail Expected Results State of the checkbox should be remembered "Clear Now" Button should do properly. I was surprised that there was no automated test!!! Reliability of Firefox is almost 0%
Browser console: Missing preference for ID privacy.sanitize.timeSpan preferencesBindings.js:114 Missing preference for ID privacy.cpd.history preferencesBindings.js:114 Missing preference for ID privacy.cpd.formdata preferencesBindings.js:114 Missing preference for ID privacy.cpd.cookies preferencesBindings.js:114 Missing preference for ID privacy.cpd.cache preferencesBindings.js:114 Missing preference for ID privacy.cpd.sessions preferencesBindings.js:114 Missing preference for ID privacy.cpd.offlineApps preferencesBindings.js:114 Missing preference for ID privacy.cpd.siteSettings preferencesBindings.js:114
same thing happens to me, the buttons and checkboxes are completely unresponsive. Firefox Nightly 59.0a1 (2018-01-06) x64 here's what i get in the broser console: Missing preference for ID privacy.sanitize.timeSpan preferencesBindings.js:114 Missing preference for ID privacy.cpd.history preferencesBindings.js:114 Missing preference for ID privacy.cpd.formdata preferencesBindings.js:114 Missing preference for ID privacy.cpd.cookies preferencesBindings.js:114 Missing preference for ID privacy.cpd.cache preferencesBindings.js:114 Missing preference for ID privacy.cpd.sessions preferencesBindings.js:114 Missing preference for ID privacy.cpd.offlineApps preferencesBindings.js:114 Missing preference for ID privacy.cpd.siteSettings preferencesBindings.js:114 TypeError: window.opener.Preferences is undefined[Learn More] preferencesBindings.js:307:15 TypeError: gSanitizePromptDialog is undefined[Learn More] sanitize.xul:1:1 TypeError: preference is null[Learn More] preferencesBindings.js:178:17 TypeError: gSanitizePromptDialog is undefined[Learn More] dialog.xml%20line%20407%20%3E%20Function:3:1
Hmm, I thought that I had tested this manually. Looking…
Assignee: nobody → myk
Status: NEW → ASSIGNED
Blocks: 1428695
(In reply to Alice0775 White from comment #0) > I was surprised that there was no automated test!!! I am too. I filed bug 1428695 on this. (In reply to Myk Melez [:myk] [@mykmelez] from comment #3) > Hmm, I thought that I had tested this manually. Looking… Ah, I tested manually on Mac, where window.opener is null, so the regressing line of code never runs. The regression affects Windows and Linux, where window.opener is defined, so the Preference constructor tries to call window.opener.Preferences.get(), although "Preferences" isn't defined on window.opener for the Clear Recent History dialog. The fix is to ensure window.opener.Preferences is defined before using it.
Attachment #8940588 - Flags: review?(jaws)
Problem with dialog itself, not with the history parts. Seems like we store most of these in Firefox:General.
Component: Bookmarks & History → General
Comment on attachment 8940588 [details] [diff] [review] ensure window.opener.Preferences is defined Review of attachment 8940588 [details] [diff] [review]: ----------------------------------------------------------------- We have tests for this dialog at https://searchfox.org/mozilla-central/rev/f42618c99dcb522fb674221acfbc68c2d92e7936/browser/base/content/test/general/browser_sanitizeDialog.js Since this is a regression we shouldn't land this fix without a test to make sure that it doesn't regress again. I don't know why that test wouldn't have caught this issue, I checked browser.ini and it is not disabled on any platforms. Your change looks fine but I'm marking r- due to lack of test.
Attachment #8940588 - Flags: review?(jaws) → review-
(In reply to Jared Wein [:jaws] (please needinfo? me) from comment #9) > We have tests for this dialog at > https://searchfox.org/mozilla-central/rev/ > f42618c99dcb522fb674221acfbc68c2d92e7936/browser/base/content/test/general/ > browser_sanitizeDialog.js Ah, indeed. > Since this is a regression we shouldn't land this fix without a test to make > sure that it doesn't regress again. I don't know why that test wouldn't have > caught this issue, I checked browser.ini and it is not disabled on any > platforms. I took a look at the test, and it turns out that it opens the Clear Recent History dialog without a parent, even on Windows and Linux, which is why it didn't catch this regression. > Your change looks fine but I'm marking r- due to lack of test. Here's a patch that "parents" the dialog on Windows and Linux, to simulate the way the user opens it on those platforms and ensure that the test will catch this regression if it recurs in the future.
Attachment #8940588 - Attachment is obsolete: true
Attachment #8940888 - Flags: review?(jaws)
Flags: needinfo?(jaws)
Comment on attachment 8940888 [details] [diff] [review] ensure window.opener.Preferences is defined Review of attachment 8940888 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8940888 - Flags: review?(jaws) → review+
Flags: needinfo?(jaws)
Pushed by myk@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/453a923a261c ensure window.opener.Preferences is defined; r=jaws
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
I'm confirming that bug is fixed, starting in Mozilla Firefox Nightly 59.0a1 (2018-01-09), so I'm marking this bug as VERIFIED. Thank you very much! \o/
Status: RESOLVED → VERIFIED
QA Contact: Virtual
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: