Closed Bug 1462469 Opened 6 years ago Closed 6 years ago

Add a "Clear Cookies and Site Data" footer button to the identity popup

Categories

(Firefox :: Site Identity, enhancement, P1)

enhancement

Tracking

()

VERIFIED FIXED
Firefox 62
Tracking Status
relnote-firefox --- 62+
firefox62 + verified
firefox63 --- verified

People

(Reporter: johannh, Assigned: johannh)

References

(Blocks 2 open bugs)

Details

(Keywords: feature)

Attachments

(1 file)

Assignee: nobody → jhofmann
Status: NEW → ASSIGNED
Comment on attachment 8976819 [details]
Bug 1462469 - Add a "Clear Cookies and Site Data" footer button to the identity popup.

https://reviewboard.mozilla.org/r/244912/#review251828

Thanks! Tested quickly and everything seems to work fine :)

::: browser/base/content/test/siteIdentity/browser_identityPopup_clearSiteData.js:25
(Diff revision 1)
> +    SiteDataTestUtils.addToCookies(TEST_ORIGIN, "test1", "1");
> +    SiteDataTestUtils.addToCookies(TEST_ORIGIN, "test2", "2");
> +    SiteDataTestUtils.addToCookies(TEST_SUB_ORIGIN, "test1", "1");
> +  }
> +
> +  await BrowserTestUtils.withNewTab(TEST_ORIGIN, async function(browser) {

nit: any reason for not using an arrow function here?

::: browser/base/content/test/siteIdentity/browser_identityPopup_clearSiteData.js:49
(Diff revision 1)
> +    let clearButton = document.getElementById("identity-popup-clear-sitedata-button");
> +    ok(!clearFooter.hidden, "The clear data footer is not hidden.");
> +
> +    let cookiesCleared;
> +    if (testCookies) {
> +      cookiesCleared = TestUtils.topicObserved("cookie-changed", (subj, data) => data == "deleted");

Hmm, we added three cookies right? So shouldn't we wait for three cookie-changed notifications? I feel like we might get failures if the notification wasn't fired yet when we await cookiesCleared - we'd only be waiting on one cookie.

This might just me not understanding how cookie-changed works though :)

Alternatively, why not just use waitForCondition to wait until there are no more cookies, the same way we check quota storage was deleted?
Attachment #8976819 - Flags: review?(nhnt11) → review+
Comment on attachment 8976819 [details]
Bug 1462469 - Add a "Clear Cookies and Site Data" footer button to the identity popup.

https://reviewboard.mozilla.org/r/244912/#review251828

> nit: any reason for not using an arrow function here?

Egh, it's not required, right? :)

> Hmm, we added three cookies right? So shouldn't we wait for three cookie-changed notifications? I feel like we might get failures if the notification wasn't fired yet when we await cookiesCleared - we'd only be waiting on one cookie.
> 
> This might just me not understanding how cookie-changed works though :)
> 
> Alternatively, why not just use waitForCondition to wait until there are no more cookies, the same way we check quota storage was deleted?

Waiting for all 3 cookies now, good suggestion, thanks!
Pushed by jhofmann@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/59118f646da4
Add a "Clear Cookies and Site Data" footer button to the identity popup. r=nhnt11
https://hg.mozilla.org/mozilla-central/rev/59118f646da4
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Depends on: 1464010
Johann, could you add a release note request? I think we want to mention that feature in the Nightly release notes at least. Thanks

https://wiki.mozilla.org/Release_Management/Release_Notes#How_to_nominate_a_bug_for_release_notes_addition.3F
Flags: needinfo?(jhofmann)
Release Note Request (optional, but appreciated)
[Why is this notable]: Users can now more easily than ever clear data from sites they're on
[Affects Firefox for Android]: Nope :\
[Suggested wording]: Added a "Clear Site Data and Cookies" button to the identity popup that allows you to reset local data from websites you're visiting, with only 3 clicks. This will not prevent cross-origin frames from tracking you online, so be sure to use Tracking Protection.
[Links (documentation, blog post, etc)]: None, though we might make one for the larger set of changes we're making to TP/Identity UI
relnote-firefox: --- → ?
Flags: needinfo?(jhofmann)
Thanks, note added with this wording:

Added a ***Clear Site Data and Cookies*** button to the identity popup located next to  the address bar so as to provide a quick and easy process to delete local data for the visited website.

I am leaving the relnote-firefox? flag so as that it stays on our radar when we move nightly to beta.
Keywords: feature
Depends on: 1467385
Depends on: 1473199
I have reproduced this bug with Nightly 62.0a1 (2018-05-17) on Windows 10, 64 Bit!
This bug's fix is verified with latest Beta!

Build ID 	20180712042337
User Agent 	Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0
QA Whiteboard: [testday-20180713]
I have reproduced this bug with Nightly 62.0a1 (2018-05-17) on Ubuntu 18.04 LTS, 64 Bit!

This bug's fix is verified with the latest Beta!

Build ID 	20180712042337
User Agent 	Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

[testday-20180713]
I can confirm comment 12, I verified using Fx 63.0a1(23-07-2018) and Fx 62.0b10, on Windows 10 x64, Ubuntu 14.04 LTS x64 and mac OS 10.13.5.
Status: RESOLVED → VERIFIED
Blocks: 1773288
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: