add tab tests

This commit is contained in:
Shin'ya Ueoka 2018-02-17 22:41:08 +09:00
parent 30d6872fa8
commit cbd8f5b928
5 changed files with 158 additions and 9 deletions

View file

@ -13,6 +13,14 @@ const create = (props = {}) => {
});
};
export {
create,
const selectAt = (props = {}) => {
return browser.tabs.query({ windowId: props.windowId }).then((tabs) => {
let target = tabs[props.index];
return browser.tabs.update(target.id, { active: true });
});
};
export {
create, selectAt
};