diff options
author | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 20:41:20 +0000 |
---|---|---|
committer | dumi@chromium.org <dumi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-22 20:41:20 +0000 |
commit | da34ae09d568bf23b586b49f9ee13d730a3d71c9 (patch) | |
tree | 51177ece300917952d5a1d3c1a32ece5fe70aa0e /webkit/tools/test_shell/layout_test_controller.cc | |
parent | 35eea2e6ac7a392b22efe089c7c2675be4142237 (diff) | |
download | chromium_src-da34ae09d568bf23b586b49f9ee13d730a3d71c9.zip chromium_src-da34ae09d568bf23b586b49f9ee13d730a3d71c9.tar.gz chromium_src-da34ae09d568bf23b586b49f9ee13d730a3d71c9.tar.bz2 |
Refactor the DB code to make it accessible from test_shell.
BUG=21442
TEST=none
Review URL: http://codereview.chromium.org/203074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26855 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index dada6c4..2d0746e 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -22,6 +22,7 @@ #include "webkit/glue/dom_operations.h" #include "webkit/glue/webpreferences.h" #include "webkit/glue/webview.h" +#include "webkit/tools/test_shell/simple_database_system.h" #include "webkit/tools/test_shell/simple_resource_loader_bridge.h" #include "webkit/tools/test_shell/test_navigation_controller.h" #include "webkit/tools/test_shell/test_shell.h" @@ -125,6 +126,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) { BindMethod("waitForPolicyDelegate", &LayoutTestController::waitForPolicyDelegate); BindMethod("setWillSendRequestReturnsNullOnRedirect", &LayoutTestController::setWillSendRequestReturnsNullOnRedirect); BindMethod("whiteListAccessFromOrigin", &LayoutTestController::whiteListAccessFromOrigin); + BindMethod("clearAllDatabases", &LayoutTestController::clearAllDatabases); // The following are stubs. BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive); @@ -946,8 +948,7 @@ void LayoutTestController::fallbackMethod( } void LayoutTestController::whiteListAccessFromOrigin( - const CppArgumentList& args, CppVariant* result) -{ + const CppArgumentList& args, CppVariant* result) { result->SetNull(); if (args.size() != 4 || !args[0].isString() || !args[1].isString() || @@ -964,6 +965,12 @@ void LayoutTestController::whiteListAccessFromOrigin( args[3].ToBoolean()); } +void LayoutTestController::clearAllDatabases( + const CppArgumentList& args, CppVariant* result) { + result->SetNull(); + SimpleDatabaseSystem::GetInstance()->ClearAllDatabases(); +} + void LayoutTestController::LogErrorToConsole(const std::string& text) { shell_->delegate()->didAddMessageToConsole( WebConsoleMessage(WebConsoleMessage::LevelError, |