Bug 1330167 - CookieStore.tabIds should be an array of tab IDs r=aswan

MozReview-Commit-ID: 7KuVKEEOhlv

--HG--
extra : rebase_source : 5c9693ec8194da62805fc6b4fbc3ba2513e9f1c3
This commit is contained in:
Tomislav Jovanovic 2017-01-13 11:58:32 +01:00
parent 7b7952b0a5
commit 9723a29fc6
3 changed files with 4 additions and 2 deletions

View File

@ -96,6 +96,7 @@ add_task(function* () {
let store = stores.find(store => store.id === tab.cookieStoreId);
browser.test.assertTrue(!!store, "We have a store for this tab.");
browser.test.assertTrue(store.tabIds.includes(tab.id), "tabIds includes this tab.");
await browser.tabs.remove(tab.id);

View File

@ -427,7 +427,7 @@ extensions.registerSchemaAPI("cookies", "addon_parent", context => {
if (!(tab.cookieStoreId in data)) {
data[tab.cookieStoreId] = [];
}
data[tab.cookieStoreId].push(tab);
data[tab.cookieStoreId].push(tab.id);
}
}

View File

@ -85,7 +85,8 @@ add_task(function* test_cookies() {
let stores = await browser.cookies.getAllCookieStores();
browser.test.assertEq(1, stores.length, "expected number of stores returned");
browser.test.assertEq(STORE_ID, stores[0].id, "expected store id returned");
browser.test.assertEq(1, stores[0].tabIds.length, "one tab returned for store");
browser.test.assertEq(1, stores[0].tabIds.length, "one tabId returned for store");
browser.test.assertEq("number", typeof stores[0].tabIds[0], "tabId is a number");
{
let privateWindow = await browser.windows.create({incognito: true});