onerror = function()
    {
        // Unexpected error
        window.webkit.messageHandlers.testHandler.postMessage('Error');
    }

    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');
        }

     