Closed Bug 1579209 Opened 5 years ago Closed 5 years ago

[Protections Panel] Use new STATE_COOKIES_LOADED_TRACKER for cookies category item visibility logic

Categories

(Firefox :: Site Identity, task, P1)

task

Tracking

()

VERIFIED FIXED
Firefox 71
Tracking Status
firefox70 --- wontfix
firefox71 --- verified

People

(Reporter: nhnt11, Assigned: nhnt11)

References

Details

(Whiteboard: [privacy-panel])

Attachments

(1 file)

In bug 1576641, two new COOKIES_LOADED content blocking states were added - one for social trackers and one for other cross-site trackers. We should use them for our category item visibility logic.

Depends on: 1576641
Summary: [Protections Panel] Use new COOKIES_LOADED content blocking states for category item visibility logic → [Protections Panel] Use new STATE_COOKIES_LOADED_TRACKER for cookies category item visibility logic
Pushed by nhnt11@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/40d374fb9455
[Protections Panel] Use new STATE_COOKIES_LOADED_TRACKER  for cookies category item visibility logic. r=johannh
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 71

Comment on attachment 9096571 [details]
Bug 1579209 - [Protections Panel] Use new STATE_COOKIES_LOADED_TRACKER for cookies category item visibility logic. r=johannh

Beta/Release Uplift Approval Request

  • User impact if declined: Sometimes, the "Cross-Site Tracking Cookies" category will be displayed but there will be no items in the subview after clicking on it.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The change replaces a workaround with a more resilient solution, based on new platform support that landed in 70 already. Minimal code change, covered by automated tests.
  • String changes made/needed: None.
Attachment #9096571 - Flags: approval-mozilla-beta?

Can you describe how to test and verify this? Thanks!

Flags: needinfo?(nhnt11)

Hmm, here's one way to do it:

  1. Navigate to about:preferences#privacy
  2. Set ETP to "Custom" and UNCHECK "Cookies"
  3. Navigate to https://wikpedia.org
  4. Open the Protections Popup.

Results without the patch:
"Cross-Site Tracking Cookies" category button is shown. When clicked, the subview that's opened is empty.

Results with the patch:
"No Trackers Detected" is shown.

Flags: needinfo?(nhnt11)
QA Whiteboard: [qa-triaged]

I tested this issue with Nightly 71.0a1(2019-10-1) on Mac OS 10.14, Windows 10 and Ubuntu 18.04 and I can confirm the fix, "No Trackers Detected" is shown.

Comment on attachment 9096571 [details]
Bug 1579209 - [Protections Panel] Use new STATE_COOKIES_LOADED_TRACKER for cookies category item visibility logic. r=johannh

Fix for skyline feature, verified in nightly.
OK for uplift for beta 12.

Attachment #9096571 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Backed out changeset 094619e16be0 (Bug 1579209) for browser chrome failure at browser_trackingUI_cookies_subview.js a=backout

Push with failure: https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&revision=17b4f7b2c9697d78f98a702572864bd96001d1e0

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=269502139&repo=mozilla-beta&lineNumber=4797

Backout log: https://treeherder.mozilla.org/#/jobs?repo=mozilla-beta&searchStr=bc1&revision=24de1dfb60861c82f36c75e700d843cf75081adc

[task 2019-10-02T20:18:48.006Z] 20:18:48     INFO - Received onSecurityChange event 1 of 1
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Received onContentBlockingEvent event 1 of 1
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Testing cookies subview with accept all cookies.
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Received onContentBlockingEvent event 1 of 3
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Received onContentBlockingEvent event 2 of 3
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Received onContentBlockingEvent event 3 of 3
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Console message: [JavaScript Error: "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature." {file: "http://trackertest.org/browser/browser/base/content/test/trackingUI/cookieServer.sjs" line: 0}]
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - TEST-PASS | browser/base/content/test/trackingUI/browser_trackingUI_cookies_subview.js | TP category item is visible - 
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - Buffered messages finished
[task 2019-10-02T20:18:48.007Z] 20:18:48     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/trackingUI/browser_trackingUI_cookies_subview.js | Test timed out - 
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - GECKO(1732) | JavaScript error: resource://testing-common/PromiseTestUtils.jsm, line 112: uncaught exception: Object
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - Console message: [JavaScript Error: "uncaught exception: Object" {file: "resource://testing-common/PromiseTestUtils.jsm" line: 112}]
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - GECKO(1732) | MEMORY STAT | vsize 7642MB | residentFast 344MB | heapAllocated 100MB
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - TEST-OK | browser/base/content/test/trackingUI/browser_trackingUI_cookies_subview.js | took 90077ms
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - Not taking screenshot here: see the one that was previously logged
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/trackingUI/browser_trackingUI_cookies_subview.js | Found a tab after previous test timed out: http://not-tracking.example.com/browser/browser/base/content/test/trackingUI/cookiePage.html - 
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - GECKO(1732) | --DOCSHELL 0x1414bc000 == 1 [pid = 1737] [id = {23b67c86-c740-d64b-8397-6b02206a8ddd}] [url = http://trackertest.org/browser/browser/base/content/test/trackingUI/cookieServer.sjs]
[task 2019-10-02T20:18:48.008Z] 20:18:48     INFO - GECKO(1732) | ++DOCSHELL 0x11763e800 == 1 [pid = 1735] [id = {318ae3ec-6a1b-a24b-aaad-c2d0cced2b27}]
[task 2019-10-02T20:18:48.009Z] 20:18:48     INFO - GECKO(1732) | ++DOMWINDOW == 1 (0x125e64020) [pid = 1735] [serial = 46] [outer = 0x0]
[task 2019-10-02T20:18:48.009Z] 20:18:48     INFO - GECKO(1732) | ++DOMWINDOW == 2 (0x117720400) [pid = 1735] [serial = 47] [outer = 0x125e64020]
[task 2019-10-02T20:18:48.009Z] 20:18:48     INFO - GECKO(1732) | ++DOMWINDOW == 3 (0x11e507400) [pid = 1735] [serial = 48] [outer = 0x125e64020]
[task 2019-10-02T20:18:48.009Z] 20:18:48     INFO - checking window state
Flags: needinfo?(nhnt11)

Somehow, I was under the impression that bug 1576641 landed in 70. I was wrong. It landed in 71 and was not uplifted. So, we can't uplift this. Sorry for the trouble!

Flags: needinfo?(nhnt11)
Whiteboard: [privacy-panel][skyline] → [privacy-panel]

Liz, please clear the approval flag for beta.

Flags: needinfo?(lhenry)
Flags: needinfo?(lhenry)
Attachment #9096571 - Flags: approval-mozilla-beta+ → approval-mozilla-beta-
Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: