diff --git a/app/renderer/components/main/main.js b/app/renderer/components/main/main.js index 293d81cbd74..377833140d6 100644 --- a/app/renderer/components/main/main.js +++ b/app/renderer/components/main/main.js @@ -401,7 +401,7 @@ class Main extends React.Component { }) ipc.on(messages.BLOCKED_RESOURCE, (e, blockType, details) => { - windowActions.setBlockedBy(this.props.tabId, blockType, details.url) + windowActions.setBlockedBy(details.tabId, blockType, details.url) }) ipc.on(messages.HTTPSE_RULE_APPLIED, (e, ruleset, details) => { diff --git a/test/bravery-components/braveryPanelTest.js b/test/bravery-components/braveryPanelTest.js index 3bea598bdd2..3de126c7647 100644 --- a/test/bravery-components/braveryPanelTest.js +++ b/test/bravery-components/braveryPanelTest.js @@ -58,6 +58,19 @@ describe('Bravery Panel', function () { .windowByUrl(Brave.browserWindowUrl) .waitForTextValue('[data-test-id="lionBadge"]', '2') }) + it('lion badge does not update for background loads', function * () { + const url = Brave.server.url('tracking.html') + yield this.app.client + .waitForDataFile('trackingProtection') + .newTab({ url }) + .waitForTabCount(2) + .windowByUrl(Brave.browserWindowUrl) + .newTab({ url }) + .waitForTabCount(3) + .windowByUrl(Brave.browserWindowUrl) + .ipcSend('blocked-resource', 'adblock', { url, tabId: 5 }) + .waitForTextValue('[data-test-id="lionBadge"]', '2') + }) }) describe('Tracking Protection stats', function () { Brave.beforeEach(this)