Closed
Bug 1486462
Opened 6 years ago
Closed 6 years ago
Add checkboxes to the Content Blocking Preferences UI
Categories
(Firefox :: Settings UI, enhancement, P1)
Firefox
Settings UI
Tracking
()
VERIFIED
FIXED
Firefox 63
Tracking | Status | |
---|---|---|
firefox63 | --- | verified |
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file, 1 obsolete file)
34.12 KB,
patch
|
johannh
:
review+
|
Details | Diff | Splinter Review |
Updated•6 years ago
|
Priority: -- → P1
Assignee | ||
Comment 1•6 years ago
|
||
This patch adds tests for the interaction of dependent controls under each one of the categories. I need to think about what else could use tests here, but otherwise it should be complete and ready to land. This is a patch on top of bug 1484769.
Attachment #9004432 -
Flags: review?(jhofmann)
Attachment #9004432 -
Flags: review?(francesco.lodolo)
Comment 2•6 years ago
|
||
Comment on attachment 9004432 [details] [diff] [review]
Add checkboxes to the Content Blocking Preferences UI
Review of attachment 9004432 [details] [diff] [review]:
-----------------------------------------------------------------
No issues string-wise.
Attachment #9004432 -
Flags: review?(francesco.lodolo) → review+
Assignee | ||
Comment 3•6 years ago
|
||
With an additional test for the dependent tracking protection controls...
Attachment #9004608 -
Flags: review?(jhofmann)
Assignee | ||
Updated•6 years ago
|
Attachment #9004432 -
Attachment is obsolete: true
Attachment #9004432 -
Flags: review?(jhofmann)
Comment 4•6 years ago
|
||
Comment on attachment 9004608 [details] [diff] [review]
Add checkboxes to the Content Blocking Preferences UI
Review of attachment 9004608 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/preferences/in-content/privacy.js
@@ +213,5 @@
> .disabled = disabled;
> }
> +
> + // Notify observers that the TP UI has been updated
> + Services.obs.notifyObservers(window, "privacy-pane-tp-ui-updated");
Like we chatted about, I understand that this is probably the least painful solution right now, but please add a comment that this is for tests :)
@@ +636,5 @@
> */
> trackingProtectionReadPrefs() {
> let enabledPref = Preferences.get("privacy.trackingprotection.enabled");
> let pbmPref = Preferences.get("privacy.trackingprotection.pbmode.enabled");
> + let tpControl, tpCheckbox;
nit: please declare each of these on its own line
@@ +715,5 @@
> */
> trackingProtectionWritePrefs() {
> let enabledPref = Preferences.get("privacy.trackingprotection.enabled");
> let pbmPref = Preferences.get("privacy.trackingprotection.pbmode.enabled");
> + let tpControl, tpCheckbox;
nit: please on two lines
@@ +1215,5 @@
> + let bcControl = document.getElementById("blockCookiesCB");
> +
> + switch (pref.value) {
> + case Ci.nsICookieService.BEHAVIOR_ACCEPT:
> + this.enableThirdPartyCookiesUI();
This is just duplicating efforts with readBlockCookiesCB, can we remove it from there or merge these two functions somehow?
::: browser/components/preferences/in-content/tests/browser_contentblocking.js
@@ +146,5 @@
> ok(!Services.prefs.prefHasUserValue(pref), `reset the pref ${pref}`);
> }
>
> ok(Services.prefs.prefHasUserValue(TP_PREF), "did not reset the TP pref");
> + Services.prefs.clearUserPref(TP_PREF);
This should already be handled by extension.unload, no?
@@ +280,5 @@
> + "#blockCookiesCB, #blockCookiesCB > radio",
> + ];
> + let alwaysDisabledControls = [
> + "#trackingProtectionMenu",
> + "[control=trackingProtectionMenu]",
nit: indendation
@@ +361,5 @@
> Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN, // Block All Third-Party Cookies
> Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER, // Block Cookies from third-party trackers
> ];
> for (let value of prefValuesToTest) {
> + SpecialPowers.pushPrefEnv({set: [
why did you stop awaiting SpecialPowers.pushPrefEnv in most of this test?
Attachment #9004608 -
Flags: review?(jhofmann) → review+
Assignee | ||
Comment 5•6 years ago
|
||
(In reply to Johann Hofmann [:johannh] from comment #4)
> @@ +1215,5 @@
> > + let bcControl = document.getElementById("blockCookiesCB");
> > +
> > + switch (pref.value) {
> > + case Ci.nsICookieService.BEHAVIOR_ACCEPT:
> > + this.enableThirdPartyCookiesUI();
>
> This is just duplicating efforts with readBlockCookiesCB, can we remove it
> from there or merge these two functions somehow?
Indeed, these calls can now be removed. I still prefer to keep the functions separate since they do different work especially after the removal of these calls.
> :::
> browser/components/preferences/in-content/tests/browser_contentblocking.js
> @@ +146,5 @@
> > ok(!Services.prefs.prefHasUserValue(pref), `reset the pref ${pref}`);
> > }
> >
> > ok(Services.prefs.prefHasUserValue(TP_PREF), "did not reset the TP pref");
> > + Services.prefs.clearUserPref(TP_PREF);
>
> This should already be handled by extension.unload, no?
Oh, you're right.
> @@ +361,5 @@
> > Ci.nsICookieService.BEHAVIOR_REJECT_FOREIGN, // Block All Third-Party Cookies
> > Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER, // Block Cookies from third-party trackers
> > ];
> > for (let value of prefValuesToTest) {
> > + SpecialPowers.pushPrefEnv({set: [
>
> why did you stop awaiting SpecialPowers.pushPrefEnv in most of this test?
Oops, those were some debugging changes as I was powering through the test failures while working on this, I meant to have reverted them before posting the patch... Will fix before landing.
Assignee | ||
Comment 6•6 years ago
|
||
Thanks a lot for the reviews!
Pushed by eakhgari@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/0dba07112ba9
Add checkboxes to the Content Blocking Preferences UI; r=johannh,flod
Comment 8•6 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox63:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 63
Updated•6 years ago
|
Flags: qe-verify+
Comment 9•6 years ago
|
||
I can confirm the checkboxes were implemented, I verified using Fx 63.0b11, on Windows 10 x64, mac OS 10.13.6 and Ubuntu 14.04 LTS.
You need to log in
before you can comment on or make changes to this bug.
Description
•