blob: 13031a1e238fbe3e6451964e2626a185880651c8 [file] [log] [blame]
if (this.importScripts) {
importScripts('../../../resources/js-test.js');
importScripts('shared.js');
}
description('Ensure durability of transaction is expected');
indexedDBTest(onOpenUpgradeNeeded, onOpenSuccess);
function onOpenUpgradeNeeded(event)
{
preamble(event);
database = evalAndLog('database = event.target.result');
database.createObjectStore('objectstore');
shouldBeEqualToString('event.target.transaction.durability', 'default');
}
function onOpenSuccess(event)
{
preamble(event);
transaction = evalAndLog("transaction = database.transaction('objectstore')");
transaction.oncomplete = onTransactionComplete;
shouldBeEqualToString('transaction.durability', 'default');
}
function onTransactionComplete(event)
{
preamble(event);
shouldBeEqualToString('transaction.durability', 'default');
finishJSTest();
}