mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix test
--HG-- extra : rebase_source : 4afa91dbbea34da1f9de5c8e7e0de3de075000c7
This commit is contained in:
parent
422a351065
commit
f15c9f08b3
@ -28,9 +28,9 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
const indexData = [
|
const indexData = [
|
||||||
{ name: "name", keyPath: "name" },
|
{ name: "name", keyPath: "name", unique: false },
|
||||||
{ name: "height", keyPath: "height" },
|
{ name: "height", keyPath: "height", unique: false },
|
||||||
{ name: "weight", keyPath: "weight" }
|
{ name: "weight", keyPath: "weight", unique: false }
|
||||||
];
|
];
|
||||||
|
|
||||||
let request = indexedDB.open(name, description);
|
let request = indexedDB.open(name, description);
|
||||||
@ -63,7 +63,8 @@
|
|||||||
addedData = 0;
|
addedData = 0;
|
||||||
for (let i in indexData) {
|
for (let i in indexData) {
|
||||||
request = objectStore.createIndex(indexData[i].name,
|
request = objectStore.createIndex(indexData[i].name,
|
||||||
indexData[i].keyPath)
|
indexData[i].keyPath,
|
||||||
|
indexData[i].unique);
|
||||||
request.onerror = errorHandler;
|
request.onerror = errorHandler;
|
||||||
request.onsuccess = function(event) {
|
request.onsuccess = function(event) {
|
||||||
if (++addedData == indexData.length) {
|
if (++addedData == indexData.length) {
|
||||||
@ -86,9 +87,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
is(found, true, "objectStore has our index");
|
is(found, true, "objectStore has our index");
|
||||||
|
let index = objectStore.index(indexData[i].name);
|
||||||
|
is(index.name, indexData[i].name, "Correct name");
|
||||||
|
is(index.storeName, objectStore.name, "Correct store name");
|
||||||
|
is(index.keyPath, indexData[i].keyPath, "Correct keyPath");
|
||||||
|
is(index.unique, indexData[i].unique, "Correct keyPath");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
finishTest();
|
finishTest();
|
||||||
yield;
|
yield;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user