@@ -102,6 +102,7 @@ window.assignManager = {
|
|||||||
async deleteContainer(userContextId) {
|
async deleteContainer(userContextId) {
|
||||||
const sitesByContainer = await this.getAssignedSites(userContextId);
|
const sitesByContainer = await this.getAssignedSites(userContextId);
|
||||||
this.area.remove(Object.keys(sitesByContainer));
|
this.area.remove(Object.keys(sitesByContainer));
|
||||||
|
identityState.storageArea.remove(backgroundLogic.cookieStoreId(userContextId));
|
||||||
},
|
},
|
||||||
|
|
||||||
async getAssignedSites(userContextId = null) {
|
async getAssignedSites(userContextId = null) {
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
const { sinon, nextTick, buildBackgroundDom } = require("../common");
|
||||||
|
|
||||||
|
describe("#1140", () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
this.background = await buildBackgroundDom();
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("removing containers", () => {
|
||||||
|
beforeEach(async () => {
|
||||||
|
this.background.browser.contextualIdentities.onRemoved.addListener = sinon.stub();
|
||||||
|
const [promise] = this.background.browser.runtime.onMessage.addListener.yield({
|
||||||
|
method: "deleteContainer",
|
||||||
|
message: {
|
||||||
|
userContextId: "1"
|
||||||
|
}
|
||||||
|
});
|
||||||
|
await promise;
|
||||||
|
await nextTick();
|
||||||
|
});
|
||||||
|
|
||||||
|
it("should remove the identitystate from storage as well", async () => {
|
||||||
|
this.background.browser.storage.local.remove.should.have.been.calledWith([
|
||||||
|
"identitiesState@@_firefox-container-1"
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user