зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1498987 - localStorage and sessionStorage display key: key instead of key: value in developer console r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D9397 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
597134aa66
Коммит
11a5c2ff95
|
@ -65,6 +65,9 @@ async function checkValues(oi, storageType) {
|
|||
is(nodes.length, 7, "There is the expected number of nodes in the tree");
|
||||
|
||||
const title = nodes[0].querySelector(".objectTitle").textContent;
|
||||
const name1 = nodes[1].querySelector(".object-label").textContent;
|
||||
const value1 = nodes[1].querySelector(".objectBox").textContent;
|
||||
|
||||
const length = [...nodes[2].querySelectorAll(".object-label,.objectBox")]
|
||||
.map(node => node.textContent);
|
||||
const key2 = [...nodes[4].querySelectorAll(".object-label,.nodeName,.objectBox-string")]
|
||||
|
@ -79,6 +82,8 @@ async function checkValues(oi, storageType) {
|
|||
is(key2[1], "key2", `1st entry of ${storageType} entry has the correct key`);
|
||||
|
||||
const firstValue = storageType === "localStorage" ? `"value2"` : `"value4"`;
|
||||
is(name1, "key2", "Name of short descriptor is correct");
|
||||
is(value1, firstValue, "Value of short descriptor is correct");
|
||||
is(key2[2], firstValue, `1st entry of ${storageType} entry has the correct value`);
|
||||
is(key[0], "1", `2nd entry of ${storageType} entry has the correct index`);
|
||||
is(key[1], "key", `2nd entry of ${storageType} entry has the correct key`);
|
||||
|
|
|
@ -645,12 +645,7 @@ const proto = {
|
|||
if (name === "length") {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
configurable: true,
|
||||
writable: true,
|
||||
enumerable: true,
|
||||
value: name,
|
||||
};
|
||||
return desc;
|
||||
}
|
||||
|
||||
if (!desc || onlyEnumerable && !desc.enumerable) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче