| 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 feff62d80bac3135c078fe32171a24da1e6e71ce..b69bdf380a15230c46479a6cab96f68d4e51fd1d 100644
|
| --- a/webkit/tools/test_shell/layout_test_controller.cc
|
| +++ b/webkit/tools/test_shell/layout_test_controller.cc
|
| @@ -32,6 +32,7 @@
|
| #include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebSettings.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
|
| +#include "third_party/WebKit/WebKit/chromium/public/WebSpeechInputControllerMock.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
|
| #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
|
| #include "webkit/glue/dom_operations.h"
|
| @@ -203,6 +204,7 @@ LayoutTestController::LayoutTestController(TestShell* shell) :
|
| BindMethod("markerTextForListItem", &LayoutTestController::markerTextForListItem);
|
|
|
| BindMethod("setMockDeviceOrientation", &LayoutTestController::setMockDeviceOrientation);
|
| + BindMethod("setMockSpeechInputResult", &LayoutTestController::setMockSpeechInputResult);
|
|
|
| // The fallback method is called when an unknown method is invoked.
|
| BindFallbackMethod(&LayoutTestController::fallbackMethod);
|
| @@ -1109,6 +1111,15 @@ void LayoutTestController::setAllowFileAccessFromFileURLs(
|
| result->SetNull();
|
| }
|
|
|
| +void LayoutTestController::setMockSpeechInputResult(const CppArgumentList& args,
|
| + CppVariant* result) {
|
| + if (args.size() > 0 && args[0].isString()) {
|
| + shell_->speech_input_controller_mock()->setMockRecognitionResult(
|
| + WebString::fromUTF8(args[0].ToString()));
|
| + }
|
| + result->SetNull();
|
| +}
|
| +
|
| // Need these conversions because the format of the value for booleans
|
| // may vary - for example, on mac "1" and "0" are used for boolean.
|
| bool LayoutTestController::CppVariantToBool(const CppVariant& value) {
|
|
|