diff options
author | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 12:31:19 +0000 |
---|---|---|
committer | satish@chromium.org <satish@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-23 12:31:19 +0000 |
commit | ed7437e04dce8563188f572a342357c023041d26 (patch) | |
tree | 47b85acd7f9c2e9cc14988935ddeae8edef2baac /webkit | |
parent | 0e2d36662639b660f8b62f13d0dd8d14e5080274 (diff) | |
download | chromium_src-ed7437e04dce8563188f572a342357c023041d26.zip chromium_src-ed7437e04dce8563188f572a342357c023041d26.tar.gz chromium_src-ed7437e04dce8563188f572a342357c023041d26.tar.bz2 |
Revert 67085 - TestShell changes to support multiple speech input results.
This is the chromium side of https://bugs.webkit.org/show_bug.cgi?id=49736.
BUG=none
TEST=webkit layout tests will be enabled after this CL.
TBR=jorlow
TBR=satish@chromium.org
Review URL: http://codereview.chromium.org/5334001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67086 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 13 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.h | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate.cc | 2 |
3 files changed, 7 insertions, 10 deletions
diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index d344dfa..8816e85 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -207,7 +207,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) : BindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem); BindMethod("setMockDeviceOrientation", &LayoutTestController::setMockDeviceOrientation); - BindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult); + BindMethod("setMockSpeechInputResult", &LayoutTestController::setMockSpeechInputResult); // The fallback method is called when an unknown method is invoked. BindFallbackMethod(&LayoutTestController::fallbackMethod); @@ -1133,13 +1133,12 @@ void LayoutTestController::setAllowFileAccessFromFileURLs( result->SetNull(); } -void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& args, +void LayoutTestController::setMockSpeechInputResult(const CppArgumentList& args, CppVariant* result) { - if (args.size() > 0 && args[0].isString() && args[1].isNumber() && - args[2].isString()) { - shell_->speech_input_controller_mock()->addMockRecognitionResult( - WebString::fromUTF8(args[0].ToString()), args[1].ToDouble(), - WebString::fromUTF8(args[2].ToString())); + if (args.size() > 0 && args[0].isString() && args[1].isString()) { + shell_->speech_input_controller_mock()->setMockRecognitionResult( + WebString::fromUTF8(args[0].ToString()), + WebString::fromUTF8(args[1].ToString())); } result->SetNull(); } diff --git a/webkit/tools/test_shell/layout_test_controller.h b/webkit/tools/test_shell/layout_test_controller.h index 9138cc4..bd202cd 100644 --- a/webkit/tools/test_shell/layout_test_controller.h +++ b/webkit/tools/test_shell/layout_test_controller.h @@ -233,7 +233,7 @@ class LayoutTestController : public CppBoundClass { void overridePreference(const CppArgumentList& args, CppVariant* result); void setAllowUniversalAccessFromFileURLs(const CppArgumentList& args, CppVariant* result); void setAllowFileAccessFromFileURLs(const CppArgumentList& args, CppVariant* result); - void addMockSpeechInputResult(const CppArgumentList& args, CppVariant* result); + void setMockSpeechInputResult(const CppArgumentList& args, CppVariant* result); // The fallback method is called when a nonexistent method is called on // the layout test controller object. diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc index 1973acb..f22b6b8 100644 --- a/webkit/tools/test_shell/test_webview_delegate.cc +++ b/webkit/tools/test_shell/test_webview_delegate.cc @@ -1175,8 +1175,6 @@ void TestWebViewDelegate::Reset() { TestShell* shell = shell_; this->~TestWebViewDelegate(); new (this) TestWebViewDelegate(shell); - if (shell->speech_input_controller_mock()) - shell->speech_input_controller_mock()->clearResults(); } void TestWebViewDelegate::SetSmartInsertDeleteEnabled(bool enabled) { |