Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3954)

Unified Diff: webkit/tools/test_shell/test_shell_webkit_init.h

Issue 384118: Enables most DB layout tests in test_shell. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Fixed the test_expectations.txt line describing the state of hash-change-with-xhr.html. Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/simple_database_system.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_webkit_init.h
===================================================================
--- webkit/tools/test_shell/test_shell_webkit_init.h (revision 31991)
+++ webkit/tools/test_shell/test_shell_webkit_init.h (working copy)
@@ -12,6 +12,7 @@
#include "base/string_util.h"
#include "media/base/media.h"
#include "third_party/WebKit/WebKit/chromium/public/WebData.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
@@ -58,6 +59,7 @@
extensions_v8::IntervalExtension::Get());
WebKit::WebRuntimeFeatures::enableSockets(true);
WebKit::WebRuntimeFeatures::enableApplicationCache(true);
+ WebKit::WebRuntimeFeatures::enableDatabase(true);
// Load libraries for media and enable the media player.
FilePath module_path;
@@ -71,6 +73,8 @@
if (appcache_dir_.CreateUniqueTempDir())
SimpleAppCacheSystem::InitializeOnUIThread(appcache_dir_.path());
+ WebKit::WebDatabase::setObserver(&database_system_);
+
#if defined(OS_WIN)
// Ensure we pick up the default theme engine.
SetThemeEngine(NULL);
@@ -104,27 +108,27 @@
}
virtual WebKit::WebKitClient::FileHandle databaseOpenFile(
- const WebKit::WebString& file_name, int desired_flags,
+ const WebKit::WebString& vfs_file_name, int desired_flags,
WebKit::WebKitClient::FileHandle* dir_handle) {
return SimpleDatabaseSystem::GetInstance()->OpenFile(
- webkit_glue::WebStringToFilePath(file_name),
- desired_flags, dir_handle);
+ vfs_file_name, desired_flags, dir_handle);
}
- virtual int databaseDeleteFile(const WebKit::WebString& file_name,
+ virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name,
bool sync_dir) {
return SimpleDatabaseSystem::GetInstance()->DeleteFile(
- webkit_glue::WebStringToFilePath(file_name), sync_dir);
+ vfs_file_name, sync_dir);
}
- virtual long databaseGetFileAttributes(const WebKit::WebString& file_name) {
+ virtual long databaseGetFileAttributes(
+ const WebKit::WebString& vfs_file_name) {
return SimpleDatabaseSystem::GetInstance()->GetFileAttributes(
- webkit_glue::WebStringToFilePath(file_name));
+ vfs_file_name);
}
- virtual long long databaseGetFileSize(const WebKit::WebString& file_name) {
- return SimpleDatabaseSystem::GetInstance()->GetFileSize(
- webkit_glue::WebStringToFilePath(file_name));
+ virtual long long databaseGetFileSize(
+ const WebKit::WebString& vfs_file_name) {
+ return SimpleDatabaseSystem::GetInstance()->GetFileSize(vfs_file_name);
}
virtual bool getFileSize(const WebKit::WebString& path, long long& result) {
« no previous file with comments | « webkit/tools/test_shell/simple_database_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698