From a6aae4a0266149529cdb28b9db4ad8cb19741b80 Mon Sep 17 00:00:00 2001 From: "tc@google.com" Date: Thu, 11 Dec 2008 00:36:16 +0000 Subject: Second attempt at adding setSmartInsertDeleteEnabled and setSelectTrailingWhitespaceEnabled. Now we allow both to be true because that's what we do on Windows. Review URL: http://codereview.chromium.org/13213 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6761 0039d316-1c4b-4281-b951-d872f2087c98 --- webkit/tools/test_shell/layout_test_controller.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'webkit/tools/test_shell/layout_test_controller.cc') diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index 86e0527..79494b2 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -94,6 +94,8 @@ LayoutTestController::LayoutTestController(TestShell* shell) { BindMethod("execCommand", &LayoutTestController::execCommand); BindMethod("setPopupBlockingEnabled", &LayoutTestController::setPopupBlockingEnabled); BindMethod("setStopProvisionalFrameLoads", &LayoutTestController::setStopProvisionalFrameLoads); + BindMethod("setSmartInsertDeleteEnabled", &LayoutTestController::setSmartInsertDeleteEnabled); + BindMethod("setSelectTrailingWhitespaceEnabled", &LayoutTestController::setSelectTrailingWhitespaceEnabled); // The following are stubs. BindMethod("dumpAsWebArchive", &LayoutTestController::dumpAsWebArchive); @@ -534,6 +536,25 @@ void LayoutTestController::setStopProvisionalFrameLoads( stop_provisional_frame_loads_ = true; } +void LayoutTestController::setSmartInsertDeleteEnabled( + const CppArgumentList& args, CppVariant* result) { + if (args.size() > 0 && args[0].isBool()) { + shell_->delegate()->SetSmartInsertDeleteEnabled(args[0].value.boolValue); + } + + result->SetNull(); +} + +void LayoutTestController::setSelectTrailingWhitespaceEnabled( + const CppArgumentList& args, CppVariant* result) { + if (args.size() > 0 && args[0].isBool()) { + shell_->delegate()->SetSelectTrailingWhitespaceEnabled( + args[0].value.boolValue); + } + + result->SetNull(); +} + // // Unimplemented stubs // @@ -615,4 +636,3 @@ void LayoutTestController::fallbackMethod( } result->SetNull(); } - -- cgit v1.1