diff --git a/BUILD.gn b/BUILD.gn index c25972e..e2584d6 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -18,6 +18,7 @@ action("brave-extension") { "$target_gen_dir/brave_extension/build/bravelizer.css", "$target_gen_dir/brave_extension/build/img/icon-128.png", "$target_gen_dir/brave_extension/build/img/icon-16.png", + "$target_gen_dir/brave_extension/build/img/icon-16-disabled.png", "$target_gen_dir/brave_extension/build/img/icon-48.png", "$target_gen_dir/brave_extension/build/_locales/en_US/messages.json", ] diff --git a/app/background/api/browserActionAPI.ts b/app/background/api/browserActionAPI.ts index e900fa6..43f354b 100644 --- a/app/background/api/browserActionAPI.ts +++ b/app/background/api/browserActionAPI.ts @@ -16,8 +16,8 @@ export const setBadgeText = (text: string) => { * Updates the shields icon based on shields state */ export const setIcon = (url: string, tabId: number, shieldsOn: boolean) => { - const shieldsEnabledIcon = '../../img/icon-16.png' - const shieldsDisabledIcon = '../../img/icon-16-disabled.png' + const shieldsEnabledIcon = 'img/icon-16.png' + const shieldsDisabledIcon = 'img/icon-16-disabled.png' const isHttpOrHttps = url && /^http/.test(url) if (chrome.browserAction) { diff --git a/test/app/background/api/browserActionAPITest.ts b/test/app/background/api/browserActionAPITest.ts index 61b01d7..3547b8a 100644 --- a/test/app/background/api/browserActionAPITest.ts +++ b/test/app/background/api/browserActionAPITest.ts @@ -17,7 +17,7 @@ describe('BrowserAction API', () => { }) after(function () { this.spy.restore() - }) + }) it('calls chrome.browserAction.setBadgeText with the text', function () { assert(this.spy.calledOnce) assert.deepEqual(this.spy.getCall(0).args[0], { @@ -26,8 +26,8 @@ describe('BrowserAction API', () => { }) }) describe('setIcon', function () { - const enabledIconPath = '../../img/icon-16.png' - const disabledIconPath = '../../img/icon-16-disabled.png' + const enabledIconPath = 'img/icon-16.png' + const disabledIconPath = 'img/icon-16-disabled.png' before(function () { this.spy = sinon.spy(chrome.browserAction, 'setIcon') this.url = 'https://brave.com'