Skip to content

Commit

Permalink
update reference tests for protectionsState (#2323)
Browse files Browse the repository at this point in the history
Co-authored-by: Shane Osbourne <sosbourne@duckduckgo.com>
  • Loading branch information
shakyShane and Shane Osbourne committed Nov 10, 2023
1 parent 0529970 commit cf7b24b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ async function submitAndValidateReport (report) {
})
tab.upgradedHttps = report.wasUpgraded

if (report.protectionsEnabled === true) {
spyOnProperty(tab.site, 'enabledFeatures').and.returnValue(['contentBlocking'])
} else if (report.denylisted === true) {
spyOnProperty(tab.site, 'enabledFeatures').and.returnValue([])
spyOnProperty(tab.site, 'denylisted').and.returnValue(true)
}

const addRequest = (hostname, action, opts = {}) => {
tab.addToTrackers({
action,
Expand Down

0 comments on commit cf7b24b

Please sign in to comment.