summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/text_input_controller.cc
diff options
context:
space:
mode:
authorestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 21:50:53 +0000
committerestade@chromium.org <estade@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-13 21:50:53 +0000
commita8f914871101974a4856248630c08454b7a7d294 (patch)
tree322d2cf9c312b7ad60103c59bad660fab187e204 /webkit/tools/test_shell/text_input_controller.cc
parentb38f85b26762e22775e63618f005d6c55a29ef43 (diff)
downloadchromium_src-a8f914871101974a4856248630c08454b7a7d294.zip
chromium_src-a8f914871101974a4856248630c08454b7a7d294.tar.gz
chromium_src-a8f914871101974a4856248630c08454b7a7d294.tar.bz2
Properly convert from UTF8 to UTF16 in WebTextInputImpl.
String util changes by darin@chromium.org. BUG=11699 Review URL: http://codereview.chromium.org/115215 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/tools/test_shell/text_input_controller.cc')
-rw-r--r--webkit/tools/test_shell/text_input_controller.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/webkit/tools/test_shell/text_input_controller.cc b/webkit/tools/test_shell/text_input_controller.cc
index 121d9a9..a371881 100644
--- a/webkit/tools/test_shell/text_input_controller.cc
+++ b/webkit/tools/test_shell/text_input_controller.cc
@@ -4,6 +4,7 @@
#include "webkit/tools/test_shell/text_input_controller.h"
+#include "base/string_util.h"
#include "webkit/glue/webview.h"
#include "webkit/glue/webframe.h"
#include "webkit/glue/webtextinput.h"
@@ -50,7 +51,7 @@ void TextInputController::insertText(
return;
if (args.size() >= 1 && args[0].isString()) {
- text_input->InsertText(args[0].ToString());
+ text_input->InsertText(UTF8ToUTF16(args[0].ToString()));
}
}
@@ -63,7 +64,7 @@ void TextInputController::doCommand(
return;
if (args.size() >= 1 && args[0].isString()) {
- text_input->DoCommand(args[0].ToString());
+ text_input->DoCommand(UTF8ToUTF16(args[0].ToString()));
}
}
@@ -77,7 +78,7 @@ void TextInputController::setMarkedText(
if (args.size() >= 3 && args[0].isString()
&& args[1].isNumber() && args[2].isNumber()) {
- text_input->SetMarkedText(args[0].ToString(),
+ text_input->SetMarkedText(UTF8ToUTF16(args[0].ToString()),
args[1].ToInt32(),
args[2].ToInt32());
}