summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/layout_test_controller.cc
diff options
context:
space:
mode:
authortc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-11 00:36:16 +0000
committertc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-11 00:36:16 +0000
commita6aae4a0266149529cdb28b9db4ad8cb19741b80 (patch)
tree3aa520dcac0b75a501df9e44116139b810cdc7ae /webkit/tools/test_shell/layout_test_controller.cc
parent4e0f0aeb701d1920df37216a6bdf4f851074e41e (diff)
downloadchromium_src-a6aae4a0266149529cdb28b9db4ad8cb19741b80.zip
chromium_src-a6aae4a0266149529cdb28b9db4ad8cb19741b80.tar.gz
chromium_src-a6aae4a0266149529cdb28b9db4ad8cb19741b80.tar.bz2
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
Diffstat (limited to 'webkit/tools/test_shell/layout_test_controller.cc')
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc22
1 files changed, 21 insertions, 1 deletions
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();
}
-