Add test for issue #940

This commit is contained in:
stoically
2018-02-09 10:54:52 +01:00
parent 9bc9509316
commit b6bcd99dc8
2 changed files with 49 additions and 2 deletions
+6 -2
View File
@@ -18,14 +18,18 @@ module.exports = {
});
},
async openNewTab(tab) {
async openNewTab(tab, options = {isAsync: true}) {
background.browser.tabs.get.resolves(tab);
background.browser.webRequest.onBeforeRequest.addListener.yield({
frameId: 0,
tabId: tab.id,
url: tab.url
url: tab.url,
requestId: options.requestId
});
background.browser.tabs.onCreated.addListener.yield(tab);
if (!options.isAsync) {
return;
}
await nextTick();
}
},