Merge pull request #347 from ueokande/set-tab-opener

Set opener tab id
jh-changes
Shin'ya Ueoka 7 years ago committed by GitHub
commit 2fd6a3f90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      e2e/contents/zoom.test.js
  2. 4
      src/background/actions/tab.js
  3. 2
      src/background/components/background.js

@ -5,7 +5,7 @@ import * as keys from "../ambassador/src/client/keys";
const SERVER_URL = "localhost:11111/";
describe("tab test", () => {
describe("zoom test", () => {
let targetWindow;
let targetTab;

@ -1,5 +1,5 @@
const openNewTab = (url) => {
return browser.tabs.create({ url: url });
const openNewTab = (url, openerTabId) => {
return browser.tabs.create({ url, openerTabId });
};
const openToTab = (url, tab) => {

@ -31,7 +31,7 @@ export default class BackgroundComponent {
case messages.OPEN_URL:
if (message.newTab) {
return this.store.dispatch(
tabActions.openNewTab(message.url), sender);
tabActions.openNewTab(message.url, sender.tab.id), sender);
}
return this.store.dispatch(
tabActions.openToTab(message.url, sender.tab), sender);