mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add two additional test cases for removing puted items, and a small fix to make sure all cases of put are actually inserted.
This commit is contained in:
parent
7825f33ec2
commit
1864a37944
@ -194,6 +194,7 @@ GetKeyFromVariant(nsIVariant* aKey,
|
||||
|
||||
// See xpcvariant.cpp, these are the only types we should expect.
|
||||
switch (type) {
|
||||
case nsIDataType::VTYPE_VOID:
|
||||
case nsIDataType::VTYPE_EMPTY:
|
||||
if (!aAutoIncrement || aGetting) {
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
@ -61,18 +61,32 @@ function testSteps()
|
||||
{ name: "inline key; key generator",
|
||||
autoIncrement: true,
|
||||
storedObject: {name: "Lincoln"},
|
||||
keyName: "id",
|
||||
keyValue: undefined,
|
||||
},
|
||||
{ name: "inline key; no key generator",
|
||||
autoIncrement: false,
|
||||
storedObject: {id: 1, name: "Lincoln"},
|
||||
keyName: "id",
|
||||
keyValue: undefined,
|
||||
},
|
||||
// TODO add the other two cases
|
||||
{ name: "out of line key; key generator",
|
||||
autoIncrement: true,
|
||||
storedObject: {name: "Lincoln"},
|
||||
keyName: null,
|
||||
keyValue: undefined,
|
||||
},
|
||||
{ name: "out of line key; no key generator",
|
||||
autoIncrement: false,
|
||||
storedObject: {name: "Lincoln"},
|
||||
keyName: null,
|
||||
keyValue: 1,
|
||||
},
|
||||
];
|
||||
for (let i = 0; i < data.length; i++) {
|
||||
let test = data[i];
|
||||
let request = db.createObjectStore(test.name, "id", test.autoIncrement);
|
||||
let request = db.createObjectStore(test.name, test.keyName,
|
||||
test.autoIncrement);
|
||||
request.onerror = errorHandler;
|
||||
request.onsuccess = continueTest;
|
||||
event = yield;
|
||||
|
Loading…
Reference in New Issue
Block a user