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

Unified Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 203074: Refactor the DB code to make all DB layout tests pass on test_shell.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months 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/layout_test_controller.h ('k') | webkit/tools/test_shell/simple_database_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/layout_test_controller.cc
===================================================================
--- webkit/tools/test_shell/layout_test_controller.cc (revision 26700)
+++ webkit/tools/test_shell/layout_test_controller.cc (working copy)
@@ -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 @@
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::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 @@
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,
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | webkit/tools/test_shell/simple_database_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698