Diff
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/ChangeLog 2016-02-29 07:35:53 UTC (rev 197313)
@@ -1,5 +1,32 @@
2016-02-26 Brady Eidson <[email protected]>
+ Modern IDB: New database versions are never committed to SQLite.
+ <rdar://problem/24860952> and https://bugs.webkit.org/show_bug.cgi?id=154741
+
+ Modern IDB: If a database handle is not open, files are not actually deleted from disk
+ https://bugs.webkit.org/show_bug.cgi?id=154756
+
+ Reviewed by Alex Christensen.
+
+ Tested by API test "IndexedDBPersistence"
+
+ * Modules/indexeddb/server/IDBServer.cpp:
+ (WebCore::IDBServer::IDBServer::deleteDatabase): If there's not an open handle to the database, create one.
+
+ * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
+ (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction): If a version change transaction, actually
+ set the new version on disk.
+
+ * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
+ (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
+ (WebCore::IDBServer::UniqueIDBDatabase::deleteBackingStore): If there is no open backing store, create one.
+ This is necessary to both read the current database version, and to actually delete the file on disk.
+ (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): If necessary, manufacture a "most recently
+ deleted database info" from the version returned by deleteBackingStore.
+ * Modules/indexeddb/server/UniqueIDBDatabase.h:
+
+2016-02-26 Brady Eidson <[email protected]>
+
Modern IDB: Using existing database info from SQLite backing store is busted.
<rdar://problem/24848143> and https://bugs.webkit.org/show_bug.cgi?id=154735
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/IDBServer.cpp 2016-02-29 07:35:53 UTC (rev 197313)
@@ -151,10 +151,8 @@
}
auto* database = m_uniqueIDBDatabaseMap.get(requestData.databaseIdentifier());
- if (!database) {
- connection->didDeleteDatabase(IDBResultData::deleteDatabaseSuccess(requestData.requestIdentifier(), IDBDatabaseInfo(requestData.databaseIdentifier().databaseName(), 0)));
- return;
- }
+ if (!database)
+ database = &getOrCreateUniqueIDBDatabase(requestData.databaseIdentifier());
database->handleDelete(*connection, requestData);
}
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp 2016-02-29 07:35:53 UTC (rev 197313)
@@ -623,9 +623,16 @@
addResult.iterator->value = std::make_unique<SQLiteIDBTransaction>(*this, info);
auto error = addResult.iterator->value->begin(*m_sqliteDB);
- if (error.isNull() && info.mode() == IndexedDB::TransactionMode::VersionChange)
+ if (error.isNull() && info.mode() == IndexedDB::TransactionMode::VersionChange) {
m_originalDatabaseInfoBeforeVersionChange = std::make_unique<IDBDatabaseInfo>(*m_databaseInfo);
+ SQLiteStatement sql(*m_sqliteDB, ASCIILiteral("UPDATE IDBDatabaseInfo SET value = ? where key = 'DatabaseVersion';"));
+ if (sql.prepare() != SQLITE_OK
+ || sql.bindText(1, String::number(info.newVersion())) != SQLITE_OK
+ || sql.step() != SQLITE_DONE)
+ error = { IDBDatabaseException::UnknownError, ASCIILiteral("Failed to store new database version in database") };
+ }
+
return error;
}
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.cpp 2016-02-29 07:35:53 UTC (rev 197313)
@@ -193,30 +193,38 @@
// In that scenario only the first request will actually have to delete the database.
// Subsequent requests can immediately notify their completion.
- if (m_databaseInfo) {
- m_deleteBackingStoreInProgress = true;
- m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::deleteBackingStore));
- } else {
- ASSERT(m_mostRecentDeletedDatabaseInfo);
- didDeleteBackingStore();
+ if (!m_deleteBackingStoreInProgress) {
+ if (!m_databaseInfo && m_mostRecentDeletedDatabaseInfo)
+ didDeleteBackingStore(0);
+ else {
+ m_deleteBackingStoreInProgress = true;
+ m_server.postDatabaseTask(createCrossThreadTask(*this, &UniqueIDBDatabase::deleteBackingStore, m_identifier));
+ }
}
}
-void UniqueIDBDatabase::deleteBackingStore()
+void UniqueIDBDatabase::deleteBackingStore(const IDBDatabaseIdentifier& identifier)
{
ASSERT(!isMainThread());
LOG(IndexedDB, "(db) UniqueIDBDatabase::deleteBackingStore");
+ uint64_t deletedVersion = 0;
+
if (m_backingStore) {
m_backingStore->deleteBackingStore();
m_backingStore = nullptr;
m_backingStoreSupportsSimultaneousTransactions = false;
+ } else {
+ auto backingStore = m_server.createBackingStore(identifier);
+ auto databaseInfo = backingStore->getOrEstablishDatabaseInfo();
+ deletedVersion = databaseInfo.version();
+ backingStore->deleteBackingStore();
}
- m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didDeleteBackingStore));
+ m_server.postDatabaseTaskReply(createCrossThreadTask(*this, &UniqueIDBDatabase::didDeleteBackingStore, deletedVersion));
}
-void UniqueIDBDatabase::didDeleteBackingStore()
+void UniqueIDBDatabase::didDeleteBackingStore(uint64_t deletedVersion)
{
ASSERT(isMainThread());
LOG(IndexedDB, "(main) UniqueIDBDatabase::didDeleteBackingStore");
@@ -231,7 +239,12 @@
if (m_databaseInfo)
m_mostRecentDeletedDatabaseInfo = WTFMove(m_databaseInfo);
- ASSERT(m_mostRecentDeletedDatabaseInfo);
+ // If this UniqueIDBDatabase was brought into existence for the purpose of deleting the file on disk,
+ // we won't have a m_mostRecentDeletedDatabaseInfo. In that case, we'll manufacture one using the
+ // passed in deletedVersion argument.
+ if (!m_mostRecentDeletedDatabaseInfo)
+ m_mostRecentDeletedDatabaseInfo = std::make_unique<IDBDatabaseInfo>(m_identifier.databaseName(), deletedVersion);
+
m_currentOpenDBRequest->notifyDidDeleteDatabase(*m_mostRecentDeletedDatabaseInfo);
m_currentOpenDBRequest = nullptr;
Modified: releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebCore/Modules/indexeddb/server/UniqueIDBDatabase.h 2016-02-29 07:35:53 UTC (rev 197313)
@@ -125,7 +125,7 @@
void inProgressTransactionCompleted(const IDBResourceIdentifier&);
// Database thread operations
- void deleteBackingStore();
+ void deleteBackingStore(const IDBDatabaseIdentifier&);
void openBackingStore(const IDBDatabaseIdentifier&);
void performCommitTransaction(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier);
void performAbortTransaction(uint64_t callbackIdentifier, const IDBResourceIdentifier& transactionIdentifier);
@@ -145,7 +145,7 @@
void performActivateTransactionInBackingStore(uint64_t callbackIdentifier, const IDBTransactionInfo&);
// Main thread callbacks
- void didDeleteBackingStore();
+ void didDeleteBackingStore(uint64_t deletedVersion);
void didOpenBackingStore(const IDBDatabaseInfo&);
void didPerformCreateObjectStore(uint64_t callbackIdentifier, const IDBError&, const IDBObjectStoreInfo&);
void didPerformDeleteObjectStore(uint64_t callbackIdentifier, const IDBError&, uint64_t objectStoreIdentifier);
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/ChangeLog 2016-02-29 07:35:53 UTC (rev 197313)
@@ -1,3 +1,22 @@
+2016-02-26 Brady Eidson <[email protected]>
+
+ Modern IDB: New database versions are never committed to SQLite.
+ <rdar://problem/24860952> and https://bugs.webkit.org/show_bug.cgi?id=154741
+
+ Modern IDB: If a database handle is not open, files are not actually deleted from disk
+ https://bugs.webkit.org/show_bug.cgi?id=154756
+
+ Reviewed by Alex Christensen.
+
+ Add WK2 SPI to force termination of the database process.
+
+ * UIProcess/API/Cocoa/WKProcessPool.mm:
+ (-[WKProcessPool _terminateDatabaseProcess]):
+ * UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
+ * UIProcess/WebProcessPool.cpp:
+ (WebKit::WebProcessPool::terminateDatabaseProcess):
+ * UIProcess/WebProcessPool.h:
+
2016-02-25 Brady Eidson <[email protected]>
Remove LegacyIDB.
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPool.mm 2016-02-29 07:35:53 UTC (rev 197313)
@@ -251,6 +251,11 @@
_processPool->setAutomationSession(automationSession ? automationSession->_session.get() : nullptr);
}
+- (void)_terminateDatabaseProcess
+{
+ _processPool->terminateDatabaseProcess();
+}
+
@end
#endif // WK_API_ENABLED
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h 2016-02-29 07:35:53 UTC (rev 197313)
@@ -59,6 +59,9 @@
- (void)_automationCapabilitiesDidChange WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
- (void)_setAutomationSession:(_WKAutomationSession *)automationSession WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA);
+// Test only. Should be called only while no web content processes are running.
+- (void)_terminateDatabaseProcess;
+
@end
#endif
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebProcessPool.cpp (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebProcessPool.cpp 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebProcessPool.cpp 2016-02-29 07:35:53 UTC (rev 197313)
@@ -1072,6 +1072,16 @@
m_networkProcess->send(Messages::NetworkProcess::ClearCachedCredentials(), 0);
}
+void WebProcessPool::terminateDatabaseProcess()
+{
+ ASSERT(m_processes.isEmpty());
+ if (!m_databaseProcess)
+ return;
+
+ m_databaseProcess->terminate();
+ m_databaseProcess = nullptr;
+}
+
void WebProcessPool::allowSpecificHTTPSCertificateForHost(const WebCertificateInfo* certificate, const String& host)
{
if (m_networkProcess)
Modified: releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebProcessPool.h (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebProcessPool.h 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Source/WebKit2/UIProcess/WebProcessPool.h 2016-02-29 07:35:53 UTC (rev 197313)
@@ -243,6 +243,7 @@
bool isUsingTestingNetworkSession() const { return m_shouldUseTestingNetworkSession; }
void clearCachedCredentials();
+ void terminateDatabaseProcess();
void allowSpecificHTTPSCertificateForHost(const WebCertificateInfo*, const String& host);
Modified: releases/WebKitGTK/webkit-2.12/Tools/ChangeLog (197312 => 197313)
--- releases/WebKitGTK/webkit-2.12/Tools/ChangeLog 2016-02-29 07:35:21 UTC (rev 197312)
+++ releases/WebKitGTK/webkit-2.12/Tools/ChangeLog 2016-02-29 07:35:53 UTC (rev 197313)
@@ -1,3 +1,23 @@
+2016-02-26 Brady Eidson <[email protected]>
+
+ Modern IDB: New database versions are never committed to SQLite.
+ <rdar://problem/24860952> and https://bugs.webkit.org/show_bug.cgi?id=154741
+
+ Modern IDB: If a database handle is not open, files are not actually deleted from disk
+ https://bugs.webkit.org/show_bug.cgi?id=154756
+
+ Reviewed by Alex Christensen.
+
+ This also happens to test the previously untested fix for http://trac.webkit.org/changeset/197190
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+ * TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-1.html: Added.
+ * TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-2.html: Added.
+ * TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm: Added.
+ (-[IndexedDBNavigationDelegate webView:didFinishNavigation:]):
+ (-[IndexedDBMessageHandler userContentController:didReceiveScriptMessage:]):
+ (TEST):
+
2016-02-18 Philippe Normand <[email protected]>
[GStreamer] Bump internal jhbuild versions to 1.6.3
Added: releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-1.html (0 => 197313)
--- releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-1.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-1.html 2016-02-29 07:35:53 UTC (rev 197313)
@@ -0,0 +1,35 @@
+<script>
+
+var request = window.indexedDB.deleteDatabase("IndexedDBPersistence");
+request._onsuccess_ = function(e)
+{
+ continueTest();
+}
+request._onerror_ = function(e)
+{
+ // Unexpected error
+ window.webkit.messageHandlers.testHandler.postMessage('Error');
+}
+
+function continueTest()
+{
+ var request = window.indexedDB.open("IndexedDBPersistence", 2);
+
+ request._onsuccess_ = function()
+ {
+ window.webkit.messageHandlers.testHandler.postMessage('Success');
+
+ }
+ request._onerror_ = function()
+ {
+ // Unexpected error
+ window.webkit.messageHandlers.testHandler.postMessage('Error');
+ }
+ request._onupgradeneeded_ = function(event)
+ {
+ window.webkit.messageHandlers.testHandler.postMessage('UpgradeNeeded');
+
+ event.target.result.createObjectStore("TestObjectStore");
+ }
+}
+</script>
Added: releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-2.html (0 => 197313)
--- releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-2.html (rev 0)
+++ releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence-2.html 2016-02-29 07:35:53 UTC (rev 197313)
@@ -0,0 +1,22 @@
+<script>
+
+var request = window.indexedDB.open("IndexedDBPersistence");
+
+request._onsuccess_ = function(event)
+{
+ window.webkit.messageHandlers.testHandler.postMessage(event.target.result.version + " " + event.target.result.objectStoreNames[0]);
+}
+
+request._onerror_ = function()
+{
+ // Unexpected error
+ window.webkit.messageHandlers.testHandler.postMessage('Unexpected Error');
+}
+
+request._onupgradeneeded_ = function()
+{
+ // Unexpected error
+ window.webkit.messageHandlers.testHandler.postMessage('Unexpected UpgradeNeeded');
+}
+
+</script>
Added: releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm (0 => 197313)
--- releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm (rev 0)
+++ releases/WebKitGTK/webkit-2.12/Tools/TestWebKitAPI/Tests/WebKit2Cocoa/IndexedDBPersistence.mm 2016-02-29 07:35:53 UTC (rev 197313)
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import "config.h"
+
+#import "PlatformUtilities.h"
+#import "Test.h"
+#import <WebKit/WebKit.h>
+#import <WebKit/WKProcessPoolPrivate.h>
+#import <WebKit/WKUserContentControllerPrivate.h>
+#import <WebKit/_WKProcessPoolConfiguration.h>
+#import <WebKit/_WKUserStyleSheet.h>
+#import <wtf/RetainPtr.h>
+
+#if WK_API_ENABLED
+
+static bool isDoneWithNavigation;
+
+@interface IndexedDBNavigationDelegate : NSObject <WKNavigationDelegate>
+@end
+
+@implementation IndexedDBNavigationDelegate
+
+- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation
+{
+ isDoneWithNavigation = true;
+}
+
+@end
+
+static bool receivedScriptMessage;
+static RetainPtr<WKScriptMessage> lastScriptMessage;
+
+@interface IndexedDBMessageHandler : NSObject <WKScriptMessageHandler>
+@end
+
+@implementation IndexedDBMessageHandler
+
+- (void)userContentController:(WKUserContentController *)userContentController didReceiveScriptMessage:(WKScriptMessage *)message
+{
+ receivedScriptMessage = true;
+ lastScriptMessage = message;
+}
+
+@end
+
+TEST(IndexedDB, IndexedDBPersistence)
+{
+ RetainPtr<IndexedDBMessageHandler> handler = adoptNS([[IndexedDBMessageHandler alloc] init]);
+ RetainPtr<WKWebViewConfiguration> configuration = adoptNS([[WKWebViewConfiguration alloc] init]);
+ [[configuration userContentController] addScriptMessageHandler:handler.get() name:@"testHandler"];
+
+ RetainPtr<WKWebView> webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+
+ NSURLRequest *request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-1" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+ [webView loadRequest:request];
+
+ TestWebKitAPI::Util::run(&receivedScriptMessage);
+ receivedScriptMessage = false;
+ RetainPtr<NSString> string1 = (NSString *)[lastScriptMessage body];
+
+ TestWebKitAPI::Util::run(&receivedScriptMessage);
+ receivedScriptMessage = false;
+ RetainPtr<NSString> string2 = (NSString *)[lastScriptMessage body];
+
+ // Ditch this web view (ditching its web process)
+ webView = nil;
+
+ // Terminate the database process
+ [configuration.get().processPool _terminateDatabaseProcess];
+
+ // Make a new web view to finish the test
+ webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:configuration.get()]);
+
+ request = [NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"IndexedDBPersistence-2" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]];
+ [webView loadRequest:request];
+
+ TestWebKitAPI::Util::run(&receivedScriptMessage);
+ receivedScriptMessage = false;
+ RetainPtr<NSString> string3 = (NSString *)[lastScriptMessage body];
+
+ EXPECT_WK_STREQ(@"UpgradeNeeded", string1.get());
+ EXPECT_WK_STREQ(@"Success", string2.get());
+ EXPECT_WK_STREQ(@"2 TestObjectStore", string3.get());
+}
+
+#endif