Unable to disable the Scripts blocked after upgrade to 0.68.33
Scripts blocked switch after upgradeScripts blocked after upgrade to 0.68.33

Should be able to disable the Scripts blocked after upgrade to 0.68.33
Always
Brave | 0.68.133 Chromium: 77.0.3865.65聽(Official Build)聽(64-bit)
-- | --
Revision | 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS | Windows聽10 OS Version 1803 (Build 17134.523)
@brave/legacy_qa
Reproduced on Ubuntu.
Steps used:
Brave | 0.68.133 Chromium: 77.0.3865.65聽(Official Build)聽(64-bit)
-- | --
Revision | 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS | Ubuntu 18.04 LTS
Reproduced on macOS using STR from description when updating from 0.68.132 to 0.68.133
Brave | 0.68.133 Chromium: 77.0.3865.65聽(Official Build)聽(64-bit)
-- | --
Revision | 87a331a3169cab563505fb44011058b904011ba1-refs/branch-heads/3865@{#726}
OS | macOS Version 10.13.6 (Build 17G5019)
Note - close and restart of Brave did not resolve this.
Additionally, could not reproduce when updating from 0.68.131 to 0.68.132.
Found a scenario that occurs on a clean profile with 0.68.133:

For comparison, here's how this works on 0.68.132:

Confirmed this is a regression
Also confirmed this is a bug in Nightly
Here's what's happening in the code (using use-case from Laurens post above)
(in brave/components/brave_shields/browser/brave_shields_util.cc)
in the method GetNoScriptControlType:
HostContentSettingsMapFactory::GetForProfile(profile)->GetContentSetting(url, GURL(), CONTENT_SETTINGS_TYPE_JAVASCRIPT, "") is returning back CONTENT_SETTING_ALLOW
CONTENT_SETTING_BLOCK
HostContentSettingsMapFactory::GetForProfile(profile)
->SetContentSettingCustomScope(
primary_pattern, ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_JAVASCRIPT, "",
CONTENT_SETTING_BLOCK);
CONTENT_SETTING_ALLOW is returned again (in calls to GetNoScriptControlType())I believe I found the cause:
Here's what my content settings look like after making this change (from Default/Preferences):
{
"profile": {
"content_settings": {
"exceptions": {
"javascript": {
"https://brianbondy.com,*": {
"last_modified": "13212630641208984",
"setting": 2
},
"https://brianbondy.com:443,*": {
"last_modified": "13212622765957903",
"setting": 1
}
}
}
}
}
}
The top version (has setting 2) is what I set (block). The bottom one is what I did using the Chromium UI (allow). Only difference is the port is attached to the key
Fixed in 0.68.x with https://github.com/brave/brave-core/pull/3385/commits/70b326b28ff2ee59ec50e3ada738f0fc5ff0768c
Still an issue in 0.69/0.70/0.71/0.72
Closing as this issue is fixed in 0.68.x (there are some failing browser tests - those are being fixed right now)
Verification passed on
Brave | 0.68.135 Chromium: 77.0.3865.75聽(Official Build)聽(64-bit)
-- | --
Revision | 201e747d032611c5f2785cae06e894cf85be7f8a-refs/branch-heads/3865@{#776}
OS | Windows聽10 OS Version 1803 (Build 17134.523)
Verification passed on
Brave | 0.68.135 Chromium: 77.0.3865.75聽(Official Build)聽(64-bit)
-- | --
Revision | 201e747d032611c5f2785cae06e894cf85be7f8a-refs/branch-heads/3865@{#776}
OS | Ubuntu 18.04 LTS
Verification PASSED on macOS 10.14.6 x64 using the following build:
Brave | 0.68.138 Chromium: 77.0.3865.75聽(Official Build)聽(64-bit)
-- | --
Revision | 201e747d032611c5f2785cae06e894cf85be7f8a-refs/branch-heads/3865@{#776}
OS | macOS Version 10.14.6 (Build 18G95)
Most helpful comment
Found a scenario that occurs on a clean profile with 0.68.133:
---> Script blocking does not turn on. Page loads and shows content. Toggle for script blocking still shows as off.
For comparison, here's how this works on 0.68.132:
