Unreviewed, rolling out r87257.
http://trac.webkit.org/changeset/87257
https://bugs.webkit.org/show_bug.cgi?id=61457
This broke layout tests, see bug 61431. (Requested by
hwennborg on #webkit).
* storage/indexeddb/migrate-basics-expected.txt: Removed.
* storage/indexeddb/migrate-basics.html: Removed.
2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87257.
http://trac.webkit.org/changeset/87257
https://bugs.webkit.org/show_bug.cgi?id=61457
This broke layout tests, see bug 61431. (Requested by
hwennborg on #webkit).
* storage/IDBBackingStore.h:
* storage/IDBFactoryBackendImpl.cpp:
(WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
(WebCore::IDBFactoryBackendImpl::open):
* storage/IDBFactoryBackendImpl.h:
* storage/IDBFactoryBackendInterface.h:
* storage/IDBLevelDBBackingStore.cpp:
* storage/IDBLevelDBBackingStore.h:
* storage/IDBSQLiteBackingStore.cpp:
* storage/IDBSQLiteBackingStore.h:
2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87257.
http://trac.webkit.org/changeset/87257
https://bugs.webkit.org/show_bug.cgi?id=61457
This broke layout tests, see bug 61431. (Requested by
hwennborg on #webkit).
* public/WebIDBFactory.h:
* src/AssertMatchingEnums.cpp:
* src/IDBFactoryBackendProxy.cpp:
* src/IDBFactoryBackendProxy.h:
* src/WebIDBFactoryImpl.cpp:
(WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl):
(WebKit::WebIDBFactoryImpl::open):
* src/WebIDBFactoryImpl.h:
2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
Unreviewed, rolling out r87257.
http://trac.webkit.org/changeset/87257
https://bugs.webkit.org/show_bug.cgi?id=61457
This broke layout tests, see bug 61431. (Requested by
hwennborg on #webkit).
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::clearAllDatabases):
* DumpRenderTree/chromium/LayoutTestController.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@87313
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r87257.
+ http://trac.webkit.org/changeset/87257
+ https://bugs.webkit.org/show_bug.cgi?id=61457
+
+ This broke layout tests, see bug 61431. (Requested by
+ hwennborg on #webkit).
+
+ * storage/indexeddb/migrate-basics-expected.txt: Removed.
+ * storage/indexeddb/migrate-basics.html: Removed.
+
2011-05-25 Qi Zhang <qi.2.zhang@nokia.com>
Reviewed by Andreas Kling.
+++ /dev/null
-Test migration from SQLite to LevelDB.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-webkitIndexedDB.open('MigrationDatabase')
-sqliteCreateSuccess():
-db = event.target.result
-db.setVersion('new version')
-sqliteSetVersionSuccess():
-window.db.createObjectStore('PlainOldStore', {autoIncrement: false})
-store = window.db.createObjectStore('StoreWithKeyPath', {keyPath: 'id', autoIncrement: true})
-window.db.createObjectStore('StoreWithAutoIncrement', {autoIncrement: true})
-trans = db.transaction([], webkitIDBTransaction.READ_WRITE)
-index = store.createIndex('ExampleIndex','id', false)
-sqliteTestAddRecords1():
-store = trans.objectStore('PlainOldStore')
-store = store.add({name: 'George'},1)
-sqliteTestAddRecords2():
-store = trans.objectStore('StoreWithKeyPath')
-store.add({name: 'Thomas', id: 3})
-sqliteTestAddRecords3():
-store = trans.objectStore('StoreWithAutoIncrement')
-store.add({name: 'Lincoln', number: '7012'}, 5)
-leveldbOpenSuccess():
-db = event.target.result
-trans = db.transaction([], webkitIDBTransaction.READ_WRITE, 0)
-leveldbCheckPlainOldStore():
-store = trans.objectStore('PlainOldStore')
-FAIL store = trans.objectStore('PlainOldStore') threw exception Error: NOT_FOUND_ERR: DOM IDBDatabase Exception 3
-request = store.openCursor(keyRange)
-FAIL request = store.openCursor(keyRange) threw exception TypeError: Cannot call method 'openCursor' of undefined
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
+++ /dev/null
-<html>
-<head>
-<link rel="stylesheet" href="../../fast/js/resources/js-test-style.css">
-<script src="../../fast/js/resources/js-test-pre.js"></script>
-<script src="../../fast/js/resources/js-test-post-function.js"></script>
-<script src="resources/shared.js"></script>
-</head>
-<body>
-<p id="description"></p>
-<div id="console"></div>
-<script>
-
-description("Test migration from SQLite to LevelDB.");
-
-if (window.layoutTestController)
- layoutTestController.waitUntilDone();
-
-function test()
-{
- if (window.layoutTestController)
- layoutTestController.setOverrideIndexedDBBackingStore("sqlite");
-
- request = evalAndLog("webkitIndexedDB.open('MigrationDatabase')");
- request.onsuccess = sqliteOpenSuccess;
- request.onerror = unexpectedErrorCallback;
-}
-
-function sqliteOpenSuccess()
-{
- debug("sqliteCreateSuccess():");
- window.db = evalAndLog("db = event.target.result");
-
- request = evalAndLog("db.setVersion('new version')");
- request.onsuccess = sqliteSetVersionSuccess;
- request.onerror = unexpectedErrorCallback;
-}
-
-function sqliteSetVersionSuccess()
-{
- debug("sqliteSetVersionSuccess():");
- evalAndLog("window.db.createObjectStore('PlainOldStore', {autoIncrement: false})");
- window.store = evalAndLog("store = window.db.createObjectStore('StoreWithKeyPath', {keyPath: 'id', autoIncrement: true})");
- evalAndLog("window.db.createObjectStore('StoreWithAutoIncrement', {autoIncrement: true})");
-
- window.trans = evalAndLog("trans = db.transaction([], webkitIDBTransaction.READ_WRITE)");
- window.index = evalAndLog("index = store.createIndex('ExampleIndex','id', false)");
-
-
- sqliteTestAddRecords1();
-}
-
-function sqliteTestAddRecords1()
-{
- debug("sqliteTestAddRecords1():");
- window.store = evalAndLog("store = trans.objectStore('PlainOldStore')");
- request = evalAndLog("store = store.add({name: 'George'},1)");
- request.onsuccess = sqliteTestAddRecords2;
- request.onfailure = unexpectedErrorCallback;
-}
-
-function sqliteTestAddRecords2()
-{
- debug("sqliteTestAddRecords2():");
- window.store = evalAndLog("store = trans.objectStore('StoreWithKeyPath')");
-
- request = evalAndLog("store.add({name: 'Thomas', id: 3})");
- request.onsuccess = sqliteTestAddRecords3;
- request.onfailure = unexpectedErrorCallback;
-}
-
-function sqliteTestAddRecords3()
-{
- debug("sqliteTestAddRecords3():");
- window.store = evalAndLog("store = trans.objectStore('StoreWithAutoIncrement')");
- request = evalAndLog("store.add({name: 'Lincoln', number: '7012'}, 5)");
- request.onsuccess = sqliteCloseDatabase;
- request.onfailure = unexpectedErrorCallback;
-}
-
-
-function sqliteCloseDatabase()
-{
- window.db.close();
- window.db = null;
- window.trans = null;
- leveldbOpen();
-}
-
-function leveldbOpen()
-{
- if (window.layoutTestController)
- layoutTestController.setOverrideIndexedDBBackingStore("leveldb");
-
- // This next line will trigger the migration.
- request = webkitIndexedDB.open('MigrationDatabase');
- request.onsuccess = leveldbOpenSuccess;
- request.onerror = unexpectedErrorCallback;
-}
-
-function leveldbOpenSuccess()
-{
- debug("leveldbOpenSuccess():");
- window.db = evalAndLog("db = event.target.result");
- window.trans = evalAndLog("trans = db.transaction([], webkitIDBTransaction.READ_WRITE, 0)");
- leveldbCheckPlainOldStore();
-}
-
-function leveldbCheckPlainOldStore()
-{
- debug("leveldbCheckPlainOldStore():");
- window.store = evalAndLog("store = trans.objectStore('PlainOldStore')");
- window.keyRange = webkitIDBKeyRange.lowerBound(0);
- request = evalAndLog("request = store.openCursor(keyRange)");
- if (!request) {
- testMigrationEnd();
- return;
- }
- request.onsuccess = leveldbCheckPlainOldStoreCursorNext;
- request.onerror = unexpectedErrorCallback;
-}
-
-function leveldbCheckPlainOldStoreCursorNext()
-{
- debug("leveldbCheckPlainOldStoreCursorNext():");
- window.cursor = event.target.result;
- if (!window.cursor) {
- leveldbCheckStoreWithKeyPath();
- return;
- }
-
- shouldBeTrue("cursor.value.name == 'George'");
- cursor.continue();
-}
-
-function leveldbCheckStoreWithKeyPath()
-{
- debug("leveldbCheckStoreWithKeyPath():");
- window.store = evalAndLog("store = trans.objectStore('StoreWithKeyPath')");
- var keyRange = webkitIDBKeyRange.lowerBound(0);
- request = store.openCursor(keyRange);
- request.onsuccess = leveldbCheckStoreWithKeyPathCursorNext;
- request.onerror = unexpectedErrorCallback;
-}
-
-function leveldbCheckStoreWithKeyPathCursorNext()
-{
- debug("leveldbCheckStoreWithKeyPathCursorNext():");
- window.cursor = event.target.result;
- if (!window.cursor) {
- leveldbCheckStoreWithAutoIncrement();
- return;
- }
-
- shouldBeTrue("cursor.value.name == 'Thomas'");
- shouldBeTrue("cursor.value.id == '3'");
- cursor.continue();
-}
-
-function leveldbCheckStoreWithAutoIncrement()
-{
- debug("leveldbCheckStoreWithAutoIncrement():");
- window.store = evalAndLog("store = trans.objectStore('StoreWithAutoIncrement')");
- var keyRange = webkitIDBKeyRange.lowerBound(0);
- request = store.openCursor(keyRange);
- request.onsuccess = leveldbCheckStoreWithAutoIncrementCursorNext;
- request.onerror = unexpectedErrorCallback;
-}
-function leveldbCheckStoreWithAutoIncrementCursorNext()
-{
- debug("leveldbCheckStoreWithAutoIncrementCursorNext():");
- window.cursor = event.target.result;
- if (!window.cursor) {
- testMigrationEnd();
- return;
- }
-
- shouldBeTrue("cursor.value.name == 'Lincoln'");
- shouldBeTrue("cursor.value.number == '7012'");
- cursor.continue();
-}
-
-function testMigrationEnd()
-{
- window.db.close();
- window.db = null;
- layoutTestController.clearAllDatabases();
- layoutTestController.setOverrideIndexedDBBackingStore("default");
- done();
-}
-
-test();
-
-var successfullyParsed = true;
-
-</script>
-</body>
-</html>
+2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r87257.
+ http://trac.webkit.org/changeset/87257
+ https://bugs.webkit.org/show_bug.cgi?id=61457
+
+ This broke layout tests, see bug 61431. (Requested by
+ hwennborg on #webkit).
+
+ * storage/IDBBackingStore.h:
+ * storage/IDBFactoryBackendImpl.cpp:
+ (WebCore::IDBFactoryBackendImpl::IDBFactoryBackendImpl):
+ (WebCore::IDBFactoryBackendImpl::open):
+ * storage/IDBFactoryBackendImpl.h:
+ * storage/IDBFactoryBackendInterface.h:
+ * storage/IDBLevelDBBackingStore.cpp:
+ * storage/IDBLevelDBBackingStore.h:
+ * storage/IDBSQLiteBackingStore.cpp:
+ * storage/IDBSQLiteBackingStore.h:
+
2011-05-25 Alexis Menard <alexis.menard@openbossa.org>
Reviewed by Eric Carlson.
#if ENABLE(INDEXED_DATABASE)
#include "IDBCursor.h"
-#include "IDBFactoryBackendImpl.h"
-#include "IDBFactoryBackendInterface.h"
#include "SQLiteDatabase.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
+class IDBFactoryBackendImpl;
class IDBKey;
class IDBKeyRange;
class SecurityOrigin;
virtual void rollback() = 0;
};
virtual PassRefPtr<Transaction> createTransaction() = 0;
- virtual IDBFactoryBackendInterface::BackingStoreType backingStoreType() = 0;
};
} // namespace WebCore
IDBFactoryBackendImpl::IDBFactoryBackendImpl()
: m_transactionCoordinator(IDBTransactionCoordinator::create())
- , m_migrateEnabled(false)
{
}
String uniqueIdentifier = fileIdentifier + "@" + name;
IDBDatabaseBackendMap::iterator it = m_databaseBackendMap.find(uniqueIdentifier);
if (it != m_databaseBackendMap.end()) {
- // Also check that backing store types match: this is important for migration.
- if ((backingStoreType == DefaultBackingStore) || (backingStoreType == it->second->backingStore()->backingStoreType())) {
- callbacks->onSuccess(it->second);
- return;
- }
+ callbacks->onSuccess(it->second);
+ return;
}
// FIXME: Everything from now on should be done on another thread.
RefPtr<IDBBackingStore> backingStore;
IDBBackingStoreMap::iterator it2 = m_backingStoreMap.find(fileIdentifier);
- if (it2 != m_backingStoreMap.end() && (backingStoreType == it2->second->backingStoreType()))
+ if (it2 != m_backingStoreMap.end())
backingStore = it2->second;
else {
-#if ENABLE(LEVELDB)
- if (m_migrateEnabled) {
- bool hasSQLBackend = IDBSQLiteBackingStore::backingStoreExists(securityOrigin.get(), dataDir);
- bool hasLevelDbBackend = IDBLevelDBBackingStore::backingStoreExists(securityOrigin.get(), dataDir);
-
- if (hasSQLBackend && hasLevelDbBackend)
- backingStoreType = LevelDBBackingStore;
-
- // Migration: if the database exists and is SQLite we want to migrate it to LevelDB.
- if (hasSQLBackend && !hasLevelDbBackend) {
- if (migrate(name, securityOrigin.get(), dataDir, maximumSize))
- backingStoreType = LevelDBBackingStore;
- else
- backingStoreType = DefaultBackingStore;
- }
- }
-#endif
-
- if (backingStoreType == DefaultBackingStore || backingStoreType == SQLiteBackingStore)
+ if (backingStoreType == DefaultBackingStore)
backingStore = IDBSQLiteBackingStore::open(securityOrigin.get(), dataDir, maximumSize, fileIdentifier, this);
#if ENABLE(LEVELDB)
else if (backingStoreType == LevelDBBackingStore)
m_databaseBackendMap.set(uniqueIdentifier, databaseBackend.get());
}
-void IDBFactoryBackendImpl::setEnableMigration(bool enabled)
-{
- m_migrateEnabled = enabled;
-}
-
-bool IDBFactoryBackendImpl::migrate(const String& name, SecurityOrigin* securityOrigin, const String& dataDir, int64_t maximumSize)
-{
- // FIXME: Implement migration.
- return false;
-}
-
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
void removeIDBBackingStore(const String& uniqueIdentifier);
virtual void open(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize, BackingStoreType);
- virtual void setEnableMigration(bool);
private:
IDBFactoryBackendImpl();
- bool migrate(const String& name, SecurityOrigin*, const String& dataDir, int64_t maximumSize);
typedef HashMap<String, IDBDatabaseBackendImpl*> IDBDatabaseBackendMap;
IDBDatabaseBackendMap m_databaseBackendMap;
RefPtr<IDBTransactionCoordinator> m_transactionCoordinator;
- bool m_migrateEnabled;
-
// Only one instance of the factory should exist at any given time.
static IDBFactoryBackendImpl* idbFactoryBackendImpl;
};
enum BackingStoreType {
DefaultBackingStore,
- LevelDBBackingStore,
- SQLiteBackingStore
+ LevelDBBackingStore
};
virtual void open(const String& name, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize, BackingStoreType) = 0;
- virtual void setEnableMigration(bool) = 0;
};
} // namespace WebCore
return adoptRef(new DummyTransaction());
}
-bool IDBLevelDBBackingStore::backingStoreExists(SecurityOrigin* securityOrigin, const String& pathBaseArg)
-{
- String pathBase = pathBaseArg;
-
- if (pathBase.isEmpty())
- return false;
-
- // FIXME: We should eventually use the same LevelDB database for all origins.
- String path = pathByAppendingComponent(pathBase, securityOrigin->databaseIdentifier() + ".indexeddb.leveldb");
-
- // FIXME: It would be more thorough to open the database here but also more expensive.
- if (fileExists(path+"/CURRENT"))
- return true;
-
- return false;
-}
-
// FIXME: deleteDatabase should be part of IDBBackingStore.
} // namespace WebCore
virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction);
virtual PassRefPtr<Transaction> createTransaction();
- virtual IDBFactoryBackendInterface::BackingStoreType backingStoreType() { return IDBFactoryBackendInterface::LevelDBBackingStore; }
-
- static bool backingStoreExists(SecurityOrigin*, const String& pathBase);
private:
IDBLevelDBBackingStore(String identifier, IDBFactoryBackendImpl*, PassOwnPtr<LevelDBDatabase>);
return cursor.release();
}
-bool IDBSQLiteBackingStore::backingStoreExists(SecurityOrigin* securityOrigin, const String& pathBase)
-{
- String path = pathByAppendingComponent(pathBase, securityOrigin->databaseIdentifier() + ".indexeddb");
-
- SQLiteDatabase db;
- if (!db.open(path))
- return false;
-
- db.close();
- return true;
-}
-
namespace {
class TransactionImpl : public IDBBackingStore::Transaction {
virtual PassRefPtr<Cursor> openIndexCursor(int64_t databaseId, int64_t objectStoreId, int64_t indexId, const IDBKeyRange*, IDBCursor::Direction);
virtual PassRefPtr<Transaction> createTransaction();
- virtual IDBFactoryBackendInterface::BackingStoreType backingStoreType() { return IDBFactoryBackendInterface::SQLiteBackingStore; }
-
- static bool backingStoreExists(SecurityOrigin*, const String& pathBase);
private:
IDBSQLiteBackingStore(String identifier, IDBFactoryBackendImpl*);
+2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r87257.
+ http://trac.webkit.org/changeset/87257
+ https://bugs.webkit.org/show_bug.cgi?id=61457
+
+ This broke layout tests, see bug 61431. (Requested by
+ hwennborg on #webkit).
+
+ * public/WebIDBFactory.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/IDBFactoryBackendProxy.cpp:
+ * src/IDBFactoryBackendProxy.h:
+ * src/WebIDBFactoryImpl.cpp:
+ (WebKit::WebIDBFactoryImpl::WebIDBFactoryImpl):
+ (WebKit::WebIDBFactoryImpl::open):
+ * src/WebIDBFactoryImpl.h:
+
2011-05-24 Keishi Hattori <keishi@webkit.org>
Reviewed by Kent Tamura.
enum BackingStoreType {
DefaultBackingStore,
- LevelDBBackingStore,
- SQLiteBackingStore
+ LevelDBBackingStore
};
// The WebKit implementation of open ignores the WebFrame* parameter.
virtual void open(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize, BackingStoreType) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void setEnableMigration(bool) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void deleteDatabase(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir) { WEBKIT_ASSERT_NOT_REACHED(); }
-
- // Used for DumpRenderTree tests.
- WEBKIT_API static void setOverrideBackingStoreType(BackingStoreType);
- WEBKIT_API static void setTemporaryDatabaseFolder(const WebString& path);
};
} // namespace WebKit
COMPILE_ASSERT_MATCHING_ENUM(WebIDBFactory::DefaultBackingStore, IDBFactoryBackendInterface::DefaultBackingStore);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBFactory::LevelDBBackingStore, IDBFactoryBackendInterface::LevelDBBackingStore);
-COMPILE_ASSERT_MATCHING_ENUM(WebIDBFactory::SQLiteBackingStore, IDBFactoryBackendInterface::SQLiteBackingStore);
#if ENABLE(FILE_SYSTEM)
COMPILE_ASSERT_MATCHING_ENUM(WebFileSystem::TypeTemporary, AsyncFileSystem::Temporary);
m_webIDBFactory->open(name, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir, maximumSize, static_cast<WebIDBFactory::BackingStoreType>(backingStoreType));
}
-void IDBFactoryBackendProxy::setEnableMigration(bool enable)
-{
- m_webIDBFactory->setEnableMigration(enable);
-}
-
-
} // namespace WebKit
#endif // ENABLE(INDEXED_DATABASE)
PassRefPtr<WebCore::DOMStringList> databases(void) const;
virtual void open(const String& name, PassRefPtr<WebCore::IDBCallbacks>, PassRefPtr<WebCore::SecurityOrigin>, WebCore::Frame*, const String& dataDir, int64_t maximumSize, BackingStoreType);
- virtual void setEnableMigration(bool);
private:
IDBFactoryBackendProxy();
namespace WebKit {
-static WebIDBFactory::BackingStoreType overriddenBackingStoreType = WebIDBFactory::DefaultBackingStore;
-static WebString tempDatabaseFolder;
-
WebIDBFactory* WebIDBFactory::create()
{
return new WebIDBFactoryImpl();
}
-void WebIDBFactory::setOverrideBackingStoreType(BackingStoreType type)
-{
- overriddenBackingStoreType = type;
-}
-
-void WebIDBFactory::setTemporaryDatabaseFolder(const WebString& path)
-{
- tempDatabaseFolder = path;
-}
-
WebIDBFactoryImpl::WebIDBFactoryImpl()
: m_idbFactoryBackend(IDBFactoryBackendImpl::create())
{
- m_idbFactoryBackend->setEnableMigration(true);
}
WebIDBFactoryImpl::~WebIDBFactoryImpl()
void WebIDBFactoryImpl::open(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir, unsigned long long maximumSize, BackingStoreType backingStoreType)
{
- WebString path = dataDir;
- if (overriddenBackingStoreType != DefaultBackingStore) {
- backingStoreType = overriddenBackingStoreType;
-
- // The dataDir is empty for two reasons: LevelDB in icognito mode or
- // LevelDB from DumpRenderTree. The first case is taken care of inside
- // IDBFactoryBackendImpl.cpp by forcing SQLITE backend for incognito.
- // For the DumpRenderTree case we need to keep track of the location
- // so we can wipe it out when we're done with the test.
- if (dataDir.isEmpty() && backingStoreType == LevelDBBackingStore)
- path = tempDatabaseFolder;
- }
- m_idbFactoryBackend->open(name, IDBCallbacksProxy::create(adoptPtr(callbacks)), origin, 0, path, maximumSize, static_cast<IDBFactoryBackendInterface::BackingStoreType>(backingStoreType));
-}
-
-void WebIDBFactoryImpl::setEnableMigration(bool enable)
-{
- m_idbFactoryBackend->setEnableMigration(enable);
+ m_idbFactoryBackend->open(name, IDBCallbacksProxy::create(adoptPtr(callbacks)), origin, 0, dataDir, maximumSize, static_cast<IDBFactoryBackendInterface::BackingStoreType>(backingStoreType));
}
} // namespace WebKit
virtual ~WebIDBFactoryImpl();
virtual void open(const WebString& name, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize, BackingStoreType);
- virtual void setEnableMigration(bool);
private:
WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend;
+2011-05-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r87257.
+ http://trac.webkit.org/changeset/87257
+ https://bugs.webkit.org/show_bug.cgi?id=61457
+
+ This broke layout tests, see bug 61431. (Requested by
+ hwennborg on #webkit).
+
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::clearAllDatabases):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+
2011-05-25 Qi Zhang <qi.2.zhang@nokia.com>
Reviewed by Andreas Kling.
#include "WebElement.h"
#include "WebFrame.h"
#include "WebGeolocationClientMock.h"
-#include "WebIDBFactory.h"
#include "WebInputElement.h"
#include "WebKit.h"
#include "WebNotificationPresenter.h"
// names to their methods will be done by calling bindToJavaScript() (defined
// by CppBoundClass, the parent to LayoutTestController).
bindMethod("addFileToPasteboardOnDrag", &LayoutTestController::addFileToPasteboardOnDrag);
- bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
bindMethod("addOriginAccessWhitelistEntry", &LayoutTestController::addOriginAccessWhitelistEntry);
bindMethod("addUserScript", &LayoutTestController::addUserScript);
bindMethod("addUserStyleSheet", &LayoutTestController::addUserStyleSheet);
bindMethod("setMockDeviceOrientation", &LayoutTestController::setMockDeviceOrientation);
bindMethod("setMockGeolocationError", &LayoutTestController::setMockGeolocationError);
bindMethod("setMockGeolocationPosition", &LayoutTestController::setMockGeolocationPosition);
- bindMethod("setOverrideIndexedDBBackingStore", &LayoutTestController::setOverrideIndexedDBBackingStore);
+ bindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
bindMethod("setPageVisibility", &LayoutTestController::setPageVisibility);
bindMethod("setPluginsEnabled", &LayoutTestController::setPluginsEnabled);
bindMethod("setPopupBlockingEnabled", &LayoutTestController::setPopupBlockingEnabled);
result->setNull();
}
-void LayoutTestController::setOverrideIndexedDBBackingStore(const CppArgumentList& arguments, CppVariant* result)
-{
- result->setNull();
-#if ENABLE(INDEXED_DATABASE)
- if (arguments.size() < 1 || !arguments[0].isString())
- return;
- string name = arguments[0].toString();
- if (name == "sqlite")
- WebIDBFactory::setOverrideBackingStoreType(WebIDBFactory::SQLiteBackingStore);
- else if (name == "default")
- WebIDBFactory::setOverrideBackingStoreType(WebIDBFactory::DefaultBackingStore);
- else if (name == "leveldb") {
- WebIDBFactory::setOverrideBackingStoreType(WebIDBFactory::LevelDBBackingStore);
-
- m_tempFolder = adoptPtr(webkit_support::CreateScopedTempDirectory());
- if (m_tempFolder) {
- if (m_tempFolder->CreateUniqueTempDir())
- WebIDBFactory::setTemporaryDatabaseFolder(WebString::fromUTF8(m_tempFolder->path().c_str()));
- }
- }
-#endif
-}
-
void LayoutTestController::callShouldCloseOnWebView(const CppArgumentList&, CppVariant* result)
{
result->set(m_shell->webView()->dispatchBeforeUnloadEvent());
{
result->setNull();
webkit_support::ClearAllDatabases();
- m_tempFolder.clear();
}
void LayoutTestController::setDatabaseQuota(const CppArgumentList& arguments, CppVariant* result)
class WebSpeechInputListener;
}
-namespace webkit_support {
-class ScopedTempDirectory;
-}
-
class TestShell;
class LayoutTestController : public CppBoundClass {
void clearAllDatabases(const CppArgumentList&, CppVariant*);
// Sets the default quota for all origins
void setDatabaseQuota(const CppArgumentList&, CppVariant*);
- // Overrides the backend for IndexedDB
- void setOverrideIndexedDBBackingStore(const CppArgumentList&, CppVariant*);
// Calls setlocale(LC_ALL, ...) for a specified locale.
// Resets between tests.
CppVariant m_globalFlag;
- // Used to create and destroy temporary folders.
- OwnPtr<webkit_support::ScopedTempDirectory> m_tempFolder;
-
// Bound variable counting the number of top URLs visited.
CppVariant m_webHistoryItemCount;