mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 613372 - 'IndexedDB: Success event for setVersion request has wrong result'. r=sicking, a=blocking.
This commit is contained in:
parent
f1386fb91c
commit
b17dc24412
@ -885,7 +885,7 @@ SetVersionHelper::DoDatabaseWork(mozIStorageConnection* aConnection)
|
||||
}
|
||||
|
||||
nsresult
|
||||
SetVersionHelper::GetSuccessResult(nsIWritableVariant* /* aResult */)
|
||||
SetVersionHelper::GetSuccessResult(nsIWritableVariant* aResult)
|
||||
{
|
||||
DatabaseInfo* info;
|
||||
if (!DatabaseInfo::Get(mDatabase->Id(), &info)) {
|
||||
@ -894,6 +894,7 @@ SetVersionHelper::GetSuccessResult(nsIWritableVariant* /* aResult */)
|
||||
}
|
||||
info->version = mVersion;
|
||||
|
||||
aResult->SetAsISupports(static_cast<nsPIDOMEventTarget*>(mTransaction));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -13,9 +13,6 @@
|
||||
<script type="text/javascript;version=1.7">
|
||||
function testSteps()
|
||||
{
|
||||
const VERSION_CHANGE =
|
||||
Components.interfaces.nsIIDBTransaction.VERSION_CHANGE;
|
||||
|
||||
const name = window.location.pathname;
|
||||
const description = "My Test Database";
|
||||
|
||||
@ -63,7 +60,8 @@
|
||||
};
|
||||
|
||||
event = yield;
|
||||
is(event.transaction.mode, VERSION_CHANGE, "Correct mode");
|
||||
ok(event.result === event.transaction, "Good result");
|
||||
is(event.transaction.mode, IDBTransaction.VERSION_CHANGE, "Correct mode");
|
||||
|
||||
request = moz_indexedDB.open(name, description);
|
||||
request.onerror = errorHandler;
|
||||
@ -85,7 +83,8 @@
|
||||
};
|
||||
|
||||
event = yield;
|
||||
is(event.transaction.mode, VERSION_CHANGE, "Correct mode");
|
||||
ok(event.result === event.transaction, "Good result");
|
||||
is(event.transaction.mode, IDBTransaction.VERSION_CHANGE, "Correct mode");
|
||||
|
||||
is(versionChangeEventCount, 3, "Saw all expected events");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user