mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 15:23:51 +00:00
Bug 1160368 - Part 5: Clean up some confusing browser_storage_listings.js checks. r=jdm
Also fix a reference error about undeclared variable i.
This commit is contained in:
parent
7f019cfba6
commit
93583fc60f
@ -361,9 +361,7 @@ var testCookiesObjects = Task.async(function*(index, hosts, cookiesActor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok(false, "cookie " + item.name + " should not exist in response;");
|
||||
}
|
||||
ok(found, "cookie " + item.name + " should exist in response");
|
||||
}
|
||||
};
|
||||
|
||||
@ -396,10 +394,7 @@ var testLocalStorageObjects = Task.async(function*(index, hosts, localStorageAct
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok(false, "local storage item " + item.name +
|
||||
" should not exist in response;");
|
||||
}
|
||||
ok(found, "local storage item " + item.name + " should exist in response");
|
||||
}
|
||||
};
|
||||
|
||||
@ -433,10 +428,7 @@ var testSessionStorageObjects = Task.async(function*(index, hosts, sessionStorag
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok(false, "session storage item " + item.name +
|
||||
" should not exist in response;");
|
||||
}
|
||||
ok(found, "session storage item " + item.name + " should exist in response");
|
||||
}
|
||||
};
|
||||
|
||||
@ -462,12 +454,7 @@ var testIndexedDB = Task.async(function*(indexedDBActor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok (false, item + " should not be present in list stores response");
|
||||
}
|
||||
else {
|
||||
ok (true, item + " found from indexedDB list stores response");
|
||||
}
|
||||
ok(found, item + " should exist in list stores response");
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,9 +481,7 @@ var testIndexedDBs = Task.async(function*(index, hosts, indexedDBActor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok(false, "indexed db " + item.name + " should not exist in response");
|
||||
}
|
||||
ok(found, "indexed db " + item.name + " should exist in response");
|
||||
}
|
||||
};
|
||||
|
||||
@ -537,16 +522,12 @@ var testObjectStores = Task.async(function*(index, hosts, indexedDBActor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!indexFound) {
|
||||
ok(false, "Index " + index + " should not be present in response");
|
||||
}
|
||||
ok(indexFound, "Index " + index + " should exist in response");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok(false, "indexed db " + item.name + " should not exist in response");
|
||||
}
|
||||
ok(found, "indexed db " + item.name + " should exist in response");
|
||||
}
|
||||
};
|
||||
|
||||
@ -584,9 +565,7 @@ var testIDBEntries = Task.async(function*(index, hosts, indexedDBActor) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
ok(false, "indexed db item " + item.name + " should not exist in response");
|
||||
}
|
||||
ok(found, "indexed db item " + item.name + " should exist in response");
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
var test_generator = do_run_test();
|
||||
|
||||
function run_test()
|
||||
@ -231,7 +233,7 @@ function get_creationTime(i)
|
||||
function check_remaining_cookies(aNumberTotal, aNumberOld, aNumberToExpect) {
|
||||
var enumerator = Services.cookiemgr.enumerator;
|
||||
|
||||
i = 0;
|
||||
let i = 0;
|
||||
while (enumerator.hasMoreElements()) {
|
||||
var cookie = enumerator.getNext().QueryInterface(Ci.nsICookie2);
|
||||
++i;
|
||||
|
Loading…
Reference in New Issue
Block a user