Merge 613002c64a
into aca51cc11c
This commit is contained in:
commit
490a2c3f53
3 changed files with 7 additions and 5 deletions
|
@ -808,9 +808,8 @@ window.assignManager = {
|
||||||
return this.createTabWrapper(url, cookieStoreId, index, active, openerTabId, groupId);
|
return this.createTabWrapper(url, cookieStoreId, index, active, openerTabId, groupId);
|
||||||
} else {
|
} else {
|
||||||
let confirmUrl = `${loadPage}?url=${this.encodeURLProperty(url)}&cookieStoreId=${cookieStoreId}`;
|
let confirmUrl = `${loadPage}?url=${this.encodeURLProperty(url)}&cookieStoreId=${cookieStoreId}`;
|
||||||
let currentCookieStoreId;
|
const currentCookieStoreId = backgroundLogic.cookieStoreId(currentUserContextId);
|
||||||
if (currentUserContextId) {
|
if (parseInt(currentUserContextId, 10) > 0) {
|
||||||
currentCookieStoreId = backgroundLogic.cookieStoreId(currentUserContextId);
|
|
||||||
confirmUrl += `¤tCookieStoreId=${currentCookieStoreId}`;
|
confirmUrl += `¤tCookieStoreId=${currentCookieStoreId}`;
|
||||||
}
|
}
|
||||||
return this.createTabWrapper(
|
return this.createTabWrapper(
|
||||||
|
|
|
@ -121,6 +121,9 @@ const backgroundLogic = {
|
||||||
if (!cookieStoreId) {
|
if (!cookieStoreId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (cookieStoreId === "firefox-default") {
|
||||||
|
return "0";
|
||||||
|
}
|
||||||
const container = cookieStoreId.replace("firefox-container-", "");
|
const container = cookieStoreId.replace("firefox-container-", "");
|
||||||
if (container !== cookieStoreId) {
|
if (container !== cookieStoreId) {
|
||||||
return container;
|
return container;
|
||||||
|
@ -481,7 +484,7 @@ const backgroundLogic = {
|
||||||
},
|
},
|
||||||
|
|
||||||
cookieStoreId(userContextId) {
|
cookieStoreId(userContextId) {
|
||||||
if(userContextId === 0) return "firefox-default";
|
if (parseInt(userContextId, 10) === 0) return "firefox-default";
|
||||||
return `firefox-container-${userContextId}`;
|
return `firefox-container-${userContextId}`;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -73,7 +73,7 @@ describe("Assignment Comfirm Page Feature", function () {
|
||||||
url: "moz-extension://fake/confirm-page.html?" +
|
url: "moz-extension://fake/confirm-page.html?" +
|
||||||
`url=${encodeURIComponent(url)}` +
|
`url=${encodeURIComponent(url)}` +
|
||||||
`&cookieStoreId=${this.webExt.tab.cookieStoreId}`,
|
`&cookieStoreId=${this.webExt.tab.cookieStoreId}`,
|
||||||
cookieStoreId: undefined,
|
cookieStoreId: "firefox-default",
|
||||||
openerTabId: null,
|
openerTabId: null,
|
||||||
index: 2,
|
index: 2,
|
||||||
active: true
|
active: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue