MCPcopy
hub / github.com/mozilla/multi-account-containers / initializeWithTab

Function initializeWithTab

test/common.js:76–106  ·  view source on GitHub ↗
(details = {
  cookieStoreId: "firefox-default"
})

Source from the content-addressed store, hash-verified

74};
75
76const initializeWithTab = async (details = {
77 cookieStoreId: "firefox-default"
78}) => {
79 let tab;
80 const webExtension = await buildDom({
81 background: {
82 async afterBuild(background) {
83 tab = await background.browser.tabs._create(details);
84 }
85 },
86 popup: {
87 jsdom: {
88 beforeParse(window) {
89 window.browser.storage.local.set({
90 "browserActionBadgesClicked": [],
91 "onboarding-stage": 7,
92 "achievements": [],
93 "syncEnabled": true,
94 "replaceTabEnabled": false,
95 "mozillaVpnInstalled": false,
96 });
97 window.browser.storage.local.set.resetHistory();
98 window.browser.storage.sync.clear();
99 }
100 }
101 }
102 });
103 webExtension.tab = tab;
104
105 return webExtension;
106};
107
108module.exports = {
109 buildDom,

Callers 7

sync.test.jsFile · 0.85
assignment.test.jsFile · 0.85
containers.test.jsFile · 0.85
940.test.jsFile · 0.85
1168.test.jsFile · 0.85

Calls 1

buildDomFunction · 0.85

Tested by

no test coverage detected