blob: 51223a1cbbc1231213c6869e5e63d56d402077d1 [file] [log] [blame]
<script>
var request = window.indexedDB.deleteDatabase("IndexedDBMultiProcess");
request.onsuccess = function(e)
{
continueTest();
}
request.onerror = function(e)
{
// Unexpected error
window.webkit.messageHandlers.testHandler.postMessage('Error deleting database');
}
function continueTest()
{
var request = window.indexedDB.open("IndexedDBMultiProcess", 2);
request.onsuccess = function()
{
window.webkit.messageHandlers.testHandler.postMessage('Open success');
}
request.onerror = function()
{
// Unexpected error
window.webkit.messageHandlers.testHandler.postMessage('Unexpected error opening database');
}
request.onupgradeneeded = function(event)
{
window.webkit.messageHandlers.testHandler.postMessage('UpgradeNeeded');
var store = event.target.result.createObjectStore("TestObjectStore");
event.target.transaction.oncomplete = function() {
window.webkit.messageHandlers.testHandler.postMessage('Transaction complete');
}
event.target.transaction.onerror = function() {
window.webkit.messageHandlers.testHandler.postMessage('Transaction errored!');
}
store.put("bar", "foo");
}
}
</script>