summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 17:21:25 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-12 17:21:25 +0000
commit62a2f8c0b5c05a643eab85e2cc3b25a608175312 (patch)
tree4a2fc8b91420bd7a0c0fa67a8c008bfd7f87d8ed
parent1fc4372374147afbd71be193f43afab9ffa36611 (diff)
downloadchromium_src-62a2f8c0b5c05a643eab85e2cc3b25a608175312.zip
chromium_src-62a2f8c0b5c05a643eab85e2cc3b25a608175312.tar.gz
chromium_src-62a2f8c0b5c05a643eab85e2cc3b25a608175312.tar.bz2
Add support for the new "unix" editing behavior.
BUG=none TEST=none; the layout test that will use this will come soon. Review URL: http://codereview.chromium.org/4886003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65957 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--webkit/tools/test_shell/layout_test_controller.cc17
1 files changed, 10 insertions, 7 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc
index 885c9e0..32baaa8 100644
--- a/webkit/tools/test_shell/layout_test_controller.cc
+++ b/webkit/tools/test_shell/layout_test_controller.cc
@@ -1473,16 +1473,19 @@ void LayoutTestController::setEditingBehavior(const CppArgumentList& args,
CppVariant* result) {
result->SetNull();
WebString key = WebString::fromUTF8(args[0].ToString());
+ WebKit::WebSettings::EditingBehavior behavior;
if (key == "mac") {
- shell_->webView()->settings()->setEditingBehavior(
- WebKit::WebSettings::EditingBehaviorMac);
+ behavior = WebKit::WebSettings::EditingBehaviorMac;
} else if (key == "win") {
- shell_->webView()->settings()->setEditingBehavior(
- WebKit::WebSettings::EditingBehaviorWin);
+ behavior = WebKit::WebSettings::EditingBehaviorWin;
+ } else if (key == "unix") {
+ behavior = WebKit::WebSettings::EditingBehaviorUnix;
} else {
- LogErrorToConsole("Passed invalid editing bahavior. "
- "Should be 'mac' or 'win'.");
+ LogErrorToConsole("Passed invalid editing behavior. "
+ "Should be 'mac', 'win', or 'unix'.");
+ return;
}
+ shell_->webView()->settings()->setEditingBehavior(behavior);
}
void LayoutTestController::setGeolocationPermission(const CppArgumentList& args,
@@ -1537,7 +1540,7 @@ void LayoutTestController::setMockDeviceOrientation(const CppArgumentList& args,
shell_->device_orientation_client_mock()->setOrientation(orientation);
}
-void LayoutTestController::hasSpellingMarker(const CppArgumentList& arguments,
+void LayoutTestController::hasSpellingMarker(const CppArgumentList& arguments,
CppVariant* result) {
if (arguments.size() < 2 || !arguments[0].isNumber() || !arguments[1].isNumber())
return;