test: Added smoke test for pageAction.show fallback to no callback on chrome.
This commit is contained in:
parent
596f47bcc8
commit
0fd508671a
|
@ -5,6 +5,12 @@ console.log(name, "background page loaded");
|
|||
browser.runtime.onMessage.addListener((msg, sender) => {
|
||||
console.log(name, "background received msg", {msg, sender});
|
||||
|
||||
try {
|
||||
browser.pageAction.show(sender.tab.id);
|
||||
} catch (err) {
|
||||
return Promise.resolve(`Unexpected error on pageAction.show: ${err}`);
|
||||
}
|
||||
|
||||
return Promise.resolve("background page reply");
|
||||
});
|
||||
|
||||
|
|
|
@ -20,5 +20,8 @@
|
|||
"browser-polyfill.js",
|
||||
"background.js"
|
||||
]
|
||||
},
|
||||
"page_action": {
|
||||
"default_title": "a page action"
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue