Bug 1628732 - Don't notify block decision when uri is chrome r=timhuang,baku

Differential Revision: https://phabricator.services.mozilla.com/D73867
This commit is contained in:
Dimi Lee 2020-05-10 11:25:06 +00:00
parent a997790dad
commit dde23f5029
3 changed files with 7 additions and 4 deletions

View File

@ -18,7 +18,6 @@ support-files =
[browser_protectionsUI_background_tabs.js]
[browser_protectionsUI_categories.js]
[browser_protectionsUI_cookies_subview.js]
skip-if = (fission && !debug && os == 'win' && bits == 64) # Bug 1628732
[browser_protectionsUI_cryptominers.js]
[browser_protectionsUI_fetch.js]
support-files =
@ -35,7 +34,6 @@ skip-if = debug || asan # Bug 1546797
skip-if = fission # Bug 1614350
[browser_protectionsUI_shield_visibility.js]
[browser_protectionsUI_state.js]
skip-if = (fission && !debug && os == 'win' && bits == 64) # Bug 1628732
[browser_protectionsUI_state_reset.js]
[browser_protectionsUI_telemetry.js]
[browser_protectionsUI_trackers_subview.js]

View File

@ -314,6 +314,13 @@ bool StorageDisabledByAntiTracking(nsPIDOMWindowInner* aWindow,
}
bool disabled = StorageDisabledByAntiTrackingInternal(
aWindow, aChannel, aPrincipal, aURI, cookieJarSettings, aRejectedReason);
// Don't notify UI when the scheme is chrome, this is a workaround to avoid
// creating unnecessaty content blocking events, see Bug 1628732.
if (aWindow && aURI && aURI->SchemeIs("chrome")) {
return disabled;
}
if (aWindow) {
ContentBlockingNotifier::OnDecision(
aWindow,

View File

@ -49,7 +49,6 @@ support-files =
!/browser/base/content/test/protectionsUI/trackingAPI.js
[browser_allowListNotifications.js]
skip-if = (fission && !debug && os == 'win' && bits == 64) # Bug 1628501
support-files = subResources.sjs
[browser_addonHostPermissionIgnoredInTP.js]
[browser_allowListSeparationInPrivateAndNormalWindows.js]
@ -156,5 +155,4 @@ support-files = sharedWorker.js partitionedSharedWorker.js
skip-if = fission
[browser_thirdPartyStorageRejectionForCORS.js]
[browser_urlDecorationStripping.js]
skip-if = (fission && !debug && os == 'win' && bits == 64) # Bug 1628501
tags = remote-settings