Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: webkit/tools/test_shell/layout_test_controller.cc

Issue 5333001: TestShell changes to support multiple speech input results. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: 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 8816e85de6ef50a576efb6609443cd7cf2290fea..d344dfa6e6405e407903d2179b1346653b392668 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("setMockSpeechInputResult", &LayoutTestController::setMockSpeechInputResult);
+ BindMethod("addMockSpeechInputResult", &LayoutTestController::addMockSpeechInputResult);
// The fallback method is called when an unknown method is invoked.
BindFallbackMethod(&LayoutTestController::fallbackMethod);
@@ -1133,12 +1133,13 @@ void LayoutTestController::setAllowFileAccessFromFileURLs(
result->SetNull();
}
-void LayoutTestController::setMockSpeechInputResult(const CppArgumentList& args,
+void LayoutTestController::addMockSpeechInputResult(const CppArgumentList& args,
CppVariant* result) {
- 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()));
+ 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()));
}
result->SetNull();
}
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.h ('k') | webkit/tools/test_shell/test_webview_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698