зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1565879 - Remove content blocking header section from the protections popup. r=ewright
These should be removed anyway and I figured renaming them didn't make much sense. Differential Revision: https://phabricator.services.mozilla.com/D38021 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
127473ad9b
Коммит
f28897ee19
|
@ -1169,9 +1169,6 @@ var gProtectionsHandler = {
|
|||
// Fallback to not setting a label, it's preferable to not set a label than to set an incorrect one.
|
||||
return;
|
||||
}
|
||||
let button = document.getElementById(
|
||||
"tracking-protection-preferences-button"
|
||||
);
|
||||
let appMenuCategoryLabel = document.getElementById("appMenu-tp-category");
|
||||
let label;
|
||||
let category = Services.prefs.getStringPref(this.PREF_CB_CATEGORY);
|
||||
|
@ -1187,7 +1184,6 @@ var gProtectionsHandler = {
|
|||
break;
|
||||
}
|
||||
appMenuCategoryLabel.value = label;
|
||||
button.label = label;
|
||||
},
|
||||
|
||||
openPreferences(origin) {
|
||||
|
|
|
@ -19,53 +19,6 @@ registerCleanupFunction(function() {
|
|||
Services.prefs.clearUserPref(FP_PREF);
|
||||
});
|
||||
|
||||
add_task(async function testCategoryLabelsInControlPanel() {
|
||||
await BrowserTestUtils.withNewTab("http://www.example.com", async function() {
|
||||
await openIdentityPopup();
|
||||
|
||||
let preferencesButton = document.getElementById(
|
||||
"tracking-protection-preferences-button"
|
||||
);
|
||||
ok(preferencesButton.label, "The preferencesButton label exists");
|
||||
|
||||
Services.prefs.setStringPref(CAT_PREF, "strict");
|
||||
await TestUtils.waitForCondition(
|
||||
() =>
|
||||
preferencesButton.label ==
|
||||
gNavigatorBundle.getString("contentBlocking.category.strict")
|
||||
);
|
||||
is(
|
||||
preferencesButton.label,
|
||||
gNavigatorBundle.getString("contentBlocking.category.strict"),
|
||||
"The preferencesButton label has been changed to strict"
|
||||
);
|
||||
|
||||
Services.prefs.setStringPref(CAT_PREF, "standard");
|
||||
await TestUtils.waitForCondition(
|
||||
() =>
|
||||
preferencesButton.label ==
|
||||
gNavigatorBundle.getString("contentBlocking.category.standard")
|
||||
);
|
||||
is(
|
||||
preferencesButton.label,
|
||||
gNavigatorBundle.getString("contentBlocking.category.standard"),
|
||||
"The preferencesButton label has been changed to standard"
|
||||
);
|
||||
|
||||
Services.prefs.setStringPref(CAT_PREF, "custom");
|
||||
await TestUtils.waitForCondition(
|
||||
() =>
|
||||
preferencesButton.label ==
|
||||
gNavigatorBundle.getString("contentBlocking.category.custom")
|
||||
);
|
||||
is(
|
||||
preferencesButton.label,
|
||||
gNavigatorBundle.getString("contentBlocking.category.custom"),
|
||||
"The preferencesButton label has been changed to custom"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
add_task(async function testCategoryLabelsInAppMenu() {
|
||||
await BrowserTestUtils.withNewTab("http://www.example.com", async function() {
|
||||
let cuiTestUtils = new CustomizableUITestUtils(window);
|
||||
|
|
|
@ -51,27 +51,6 @@ add_task(async function setup() {
|
|||
});
|
||||
});
|
||||
|
||||
// Tests that pressing the content blocking preferences icon in the protections popup
|
||||
// links to about:preferences
|
||||
add_task(async function testOpenPreferencesFromCBPrefsButton() {
|
||||
await BrowserTestUtils.withNewTab("https://example.com", async function() {
|
||||
await openProtectionsPopup();
|
||||
|
||||
let preferencesButton = document.getElementById(
|
||||
"tracking-protection-preferences-button"
|
||||
);
|
||||
|
||||
ok(
|
||||
BrowserTestUtils.is_visible(preferencesButton),
|
||||
"The preferences button is shown."
|
||||
);
|
||||
|
||||
let shown = waitAndAssertPreferencesShown("trackingprotection");
|
||||
preferencesButton.click();
|
||||
await shown;
|
||||
});
|
||||
});
|
||||
|
||||
// Tests that pressing the permissions preferences icon in the identity popup
|
||||
// links to about:preferences
|
||||
add_task(async function testOpenPreferencesFromPermissionsPrefsButton() {
|
||||
|
|
|
@ -62,15 +62,6 @@ function testTrackingPage(window) {
|
|||
gNavigatorBundle.getString("trackingProtection.icon.activeTooltip"),
|
||||
"correct tooltip"
|
||||
);
|
||||
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-not-detected"),
|
||||
"blocking not detected label is hidden"
|
||||
);
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-detected"),
|
||||
"blocking detected label is visible"
|
||||
);
|
||||
}
|
||||
|
||||
function testTrackingPageUnblocked() {
|
||||
|
@ -99,15 +90,6 @@ function testTrackingPageUnblocked() {
|
|||
BrowserTestUtils.is_visible(gProtectionsHandler.iconBox),
|
||||
"icon box is visible"
|
||||
);
|
||||
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-not-detected"),
|
||||
"blocking not detected label is hidden"
|
||||
);
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-detected"),
|
||||
"blocking detected label is visible"
|
||||
);
|
||||
}
|
||||
|
||||
add_task(async function testExceptionAddition() {
|
||||
|
|
|
@ -85,14 +85,6 @@ function testBenignPage() {
|
|||
"icon box is hidden"
|
||||
);
|
||||
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-not-detected"),
|
||||
"blocking not detected label is visible"
|
||||
);
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-detected"),
|
||||
"blocking detected label is hidden"
|
||||
);
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-category-cookies"),
|
||||
"Not showing cookie restrictions category"
|
||||
|
@ -133,14 +125,6 @@ function testBenignPageWithException() {
|
|||
"icon box is not hidden"
|
||||
);
|
||||
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-not-detected"),
|
||||
"blocking not detected label is visible"
|
||||
);
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-detected"),
|
||||
"blocking detected label is hidden"
|
||||
);
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-category-cookies"),
|
||||
"Not showing cookie restrictions category"
|
||||
|
@ -196,15 +180,6 @@ function testTrackingPage(window) {
|
|||
"correct tooltip"
|
||||
);
|
||||
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-not-detected"),
|
||||
"blocking not detected label is hidden"
|
||||
);
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-detected"),
|
||||
"blocking detected label is visible"
|
||||
);
|
||||
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-category-tracking-protection"),
|
||||
"Showing trackers category"
|
||||
|
@ -252,15 +227,6 @@ function testTrackingPageUnblocked(blockedByTP, window) {
|
|||
"icon box is visible"
|
||||
);
|
||||
|
||||
ok(
|
||||
hidden("#identity-popup-content-blocking-not-detected"),
|
||||
"blocking not detected label is hidden"
|
||||
);
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-detected"),
|
||||
"blocking detected label is visible"
|
||||
);
|
||||
|
||||
ok(
|
||||
!hidden("#identity-popup-content-blocking-category-tracking-protection"),
|
||||
"Showing trackers category"
|
||||
|
|
|
@ -46,21 +46,6 @@
|
|||
<!-- Tracking Protection Section -->
|
||||
<hbox id="tracking-protection-container" class="identity-popup-section">
|
||||
<vbox id="identity-popup-content-blocking-content" flex="1">
|
||||
<hbox align="start">
|
||||
<label id="content-blocking-label"
|
||||
class="identity-popup-headline"
|
||||
flex="1">&contentBlocking.title;</label>
|
||||
<toolbarbutton id="tracking-protection-preferences-button"
|
||||
class="identity-popup-preferences-button subviewbutton"
|
||||
tooltiptext="&identity.contentBlockingPreferences.tooltip;"
|
||||
oncommand="gProtectionsHandler.openPreferences('identityPopup-TP-preferencesButton');" />
|
||||
</hbox>
|
||||
|
||||
<description id="identity-popup-content-blocking-detected"
|
||||
crop="end">&contentBlocking.detected;</description>
|
||||
<description id="identity-popup-content-blocking-not-detected"
|
||||
crop="end">&contentBlocking.notDetected;</description>
|
||||
|
||||
<vbox id="identity-popup-content-blocking-category-list">
|
||||
<toolbarbutton id="identity-popup-content-blocking-category-tracking-protection"
|
||||
onclick="gProtectionsHandler.showTrackersSubview();"
|
||||
|
|
|
@ -820,8 +820,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
|||
<!ENTITY identity.permissionsEmpty "You have not granted this site any special permissions.">
|
||||
<!ENTITY identity.permissionsReloadHint "You may need to reload the page for changes to apply.">
|
||||
<!ENTITY identity.permissionsPreferences.tooltip "Open Permissions Preferences">
|
||||
<!ENTITY identity.contentBlockingPreferences.tooltip "Open Content Blocking Preferences">
|
||||
|
||||
|
||||
<!-- Name for the tabs toolbar as spoken by screen readers.
|
||||
The word "toolbar" is appended automatically and should not be contained below! -->
|
||||
|
@ -852,10 +850,6 @@ you can use these alternative items. Otherwise, their values should be empty. -
|
|||
<!ENTITY getUserMedia.audioCapture.label "Audio from the tab will be shared.">
|
||||
<!ENTITY getUserMedia.allWindowsShared.message "All visible windows on your screen will be shared.">
|
||||
|
||||
<!ENTITY contentBlocking.title "Content Blocking">
|
||||
<!ENTITY contentBlocking.detected "Blockable content detected on this site.">
|
||||
<!ENTITY contentBlocking.notDetected "No blockable content detected on this page.">
|
||||
|
||||
<!ENTITY contentBlocking.trackingProtection3.label "Trackers">
|
||||
|
||||
<!ENTITY contentBlocking.manageSettings.label "Manage Content Blocking">
|
||||
|
|
|
@ -169,16 +169,9 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
#tracking-protection-preferences-button > .toolbarbutton-text {
|
||||
display: inline;
|
||||
padding-inline-end: 25px;
|
||||
padding-inline-start: 0px;
|
||||
}
|
||||
|
||||
/* CONTENT */
|
||||
|
||||
.identity-popup-content-blocking-empty-label,
|
||||
#tracking-protection-preferences-button > .toolbarbutton-text,
|
||||
.tracking-protection-button,
|
||||
#identity-popup-trackersView-strict-info > label,
|
||||
.identity-popup-cookiesView-list-header,
|
||||
|
@ -414,10 +407,6 @@ description#identity-popup-content-verifier,
|
|||
height: 120px;
|
||||
}
|
||||
|
||||
#identity-popup-content-blocking-content {
|
||||
background-image: url("chrome://browser/skin/controlcenter/tracking-protection.svg");
|
||||
}
|
||||
|
||||
.identity-popup-content-blocking-category {
|
||||
/* Overwrite toolbarbutton styles */
|
||||
-moz-appearance: none;
|
||||
|
@ -588,12 +577,6 @@ description#identity-popup-content-verifier,
|
|||
margin-top: 10px;
|
||||
}
|
||||
|
||||
/* Show the "detected"/"not detected" message depending on the content state. */
|
||||
#protections-popup:not([detected]) #identity-popup-content-blocking-detected,
|
||||
#protections-popup[detected] #identity-popup-content-blocking-not-detected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tracking-protection-icon {
|
||||
list-style-image: url(chrome://browser/skin/controlcenter/trackers.svg);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче