Bug 1285492 - Stop using the CPOW when testing storages for the ForgetAboutSite test of containers. r=jimm

This commit is contained in:
Tim Huang 2016-07-18 19:54:00 -04:00
Родитель bcee2574be
Коммит 790db280b4
1 изменённых файлов: 16 добавлений и 16 удалений

Просмотреть файл

@ -243,15 +243,15 @@ function* test_storage_cleared() {
// Open our tab in the given user context.
let tabInfo = yield* openTabInUserContext(TEST_URL+ "file_set_storages.html?" + value, userContextId);
// Check that the local storage has been set correctly.
let win = tabInfo.browser.contentWindow;
Assert.equal(win.localStorage.getItem("userContext"), USER_CONTEXTS[userContextId], "Check the local storage value");
// Check that the session storage has been set correctly.
Assert.equal(win.sessionStorage.getItem("userContext"), USER_CONTEXTS[userContextId], "Check the session storage value");
// Check that the indexedDB has been set correctly.
// Check that the storages has been set correctly.
yield ContentTask.spawn(tabInfo.browser, { userContext: USER_CONTEXTS[userContextId] }, function* (arg) {
// Check that the local storage has been set correctly.
Assert.equal(content.localStorage.getItem("userContext"), arg.userContext, "Check the local storage value");
// Check that the session storage has been set correctly.
Assert.equal(content.sessionStorage.getItem("userContext"), arg.userContext, "Check the session storage value");
// Check that the indexedDB has been set correctly.
let request = content.indexedDB.open("idb", 1);
let db = yield new Promise(done => {
@ -285,16 +285,16 @@ function* test_storage_cleared() {
for (let userContextId of Object.keys(USER_CONTEXTS)) {
// Open our tab in the given user context without setting local storage.
let tabInfo = yield* openTabInUserContext(TEST_URL+ "file_set_storages.html", userContextId);
let win = tabInfo.browser.contentWindow;
// Check that does the local storage be cleared or not.
Assert.ok(!win.localStorage.getItem("userContext"), "The local storage has been cleared");
// Check that does the session storage be cleared or not.
Assert.ok(!win.sessionStorage.getItem("userContext"), "The session storage has been cleared");
// Check that does the indexedDB be cleared or not.
// Check that do storages be cleared or not.
yield ContentTask.spawn(tabInfo.browser, null, function* () {
// Check that does the local storage be cleared or not.
Assert.ok(!content.localStorage.getItem("userContext"), "The local storage has been cleared");
// Check that does the session storage be cleared or not.
Assert.ok(!content.sessionStorage.getItem("userContext"), "The session storage has been cleared");
// Check that does the indexedDB be cleared or not.
let request = content.indexedDB.open("idb", 1);
let db = yield new Promise(done => {