summaryrefslogtreecommitdiffstats
path: root/webkit/tools
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools')
-rw-r--r--webkit/tools/test_shell/simple_database_system.cc14
-rw-r--r--webkit/tools/test_shell/test_shell.gyp1
2 files changed, 11 insertions, 4 deletions
diff --git a/webkit/tools/test_shell/simple_database_system.cc b/webkit/tools/test_shell/simple_database_system.cc
index ab98e1a..dd0d032 100644
--- a/webkit/tools/test_shell/simple_database_system.cc
+++ b/webkit/tools/test_shell/simple_database_system.cc
@@ -41,9 +41,15 @@ base::PlatformFile SimpleDatabaseSystem::OpenFile(
const FilePath& file_name, int desired_flags,
base::PlatformFile* dir_handle) {
base::PlatformFile file_handle = base::kInvalidPlatformFileValue;
- VfsBackend::OpenFile(GetDBFileFullPath(file_name), GetDBDir(), desired_flags,
- base::GetCurrentProcessHandle(), &file_handle,
- dir_handle);
+ if (file_name.empty()) {
+ VfsBackend::OpenTempFileInDirectory(
+ GetDBDir(), desired_flags, base::GetCurrentProcessHandle(),
+ &file_handle, dir_handle);
+ } else {
+ VfsBackend::OpenFile(GetDBFileFullPath(file_name), desired_flags,
+ base::GetCurrentProcessHandle(), &file_handle,
+ dir_handle);
+ }
// HACK: Currently, the DB object that keeps track of the main database
// (DatabaseTracker) is a singleton that is declared as a static variable
@@ -75,7 +81,7 @@ int SimpleDatabaseSystem::DeleteFile(
int error_code = SQLITE_OK;
do {
error_code = VfsBackend::DeleteFile(
- GetDBFileFullPath(file_name), GetDBDir(), sync_dir);
+ GetDBFileFullPath(file_name), sync_dir);
} while ((++num_retries < kNumDeleteRetries) &&
(error_code == SQLITE_IOERR_DELETE) &&
(PlatformThread::Sleep(10), 1));
diff --git a/webkit/tools/test_shell/test_shell.gyp b/webkit/tools/test_shell/test_shell.gyp
index 313008a..878789c 100644
--- a/webkit/tools/test_shell/test_shell.gyp
+++ b/webkit/tools/test_shell/test_shell.gyp
@@ -378,6 +378,7 @@
'../../appcache/mock_appcache_storage_unittest.cc',
'../../database/databases_table_unittest.cc',
'../../database/database_tracker_unittest.cc',
+ '../../database/database_util_unittest.cc',
'../../glue/bookmarklet_unittest.cc',
'../../glue/context_menu_unittest.cc',
'../../glue/cpp_bound_class_unittest.cc',