diff options
Diffstat (limited to 'chrome/browser/speech/speech_input_browsertest.cc')
-rw-r--r-- | chrome/browser/speech/speech_input_browsertest.cc | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/chrome/browser/speech/speech_input_browsertest.cc b/chrome/browser/speech/speech_input_browsertest.cc index e0b2aff..45b41be 100644 --- a/chrome/browser/speech/speech_input_browsertest.cc +++ b/chrome/browser/speech/speech_input_browsertest.cc @@ -42,14 +42,14 @@ class FakeSpeechInputManager : public SpeechInputManager { } // SpeechInputManager methods. - void StartRecognition(Delegate* delegate, - int caller_id, - int render_process_id, - int render_view_id, - const gfx::Rect& element_rect, - const std::string& language, - const std::string& grammar, - const std::string& origin_url) { + virtual void StartRecognition(Delegate* delegate, + int caller_id, + int render_process_id, + int render_view_id, + const gfx::Rect& element_rect, + const std::string& language, + const std::string& grammar, + const std::string& origin_url) { VLOG(1) << "StartRecognition invoked."; EXPECT_EQ(0, caller_id_); EXPECT_EQ(NULL, delegate_); @@ -60,17 +60,20 @@ class FakeSpeechInputManager : public SpeechInputManager { MessageLoop::current()->PostTask(FROM_HERE, NewRunnableMethod(this, &FakeSpeechInputManager::SetFakeRecognitionResult)); } - void CancelRecognition(int caller_id) { + virtual void CancelRecognition(int caller_id) { VLOG(1) << "CancelRecognition invoked."; EXPECT_EQ(caller_id_, caller_id); caller_id_ = 0; delegate_ = NULL; } - void StopRecording(int caller_id) { + virtual void StopRecording(int caller_id) { VLOG(1) << "StopRecording invoked."; EXPECT_EQ(caller_id_, caller_id); // Nothing to do here since we aren't really recording. } + virtual void CancelAllRequestsWithDelegate(Delegate* delegate) { + VLOG(1) << "CancelAllRequestsWithDelegate invoked."; + } private: void SetFakeRecognitionResult() { @@ -167,6 +170,11 @@ SpeechInputManager* SpeechInputBrowserTest::speech_input_manager_ = NULL; // check for sending many clicks in succession to the speech button and verify // that it doesn't cause any crash but works as expected. This should act as the // test for http://crbug.com/59173 +// +// TODO(satish): Similar to above, once this flakiness has been fixed add +// another test here to check that when speech recognition is in progress and +// a renderer crashes, we get a call to +// SpeechInputManager::CancelAllRequestsWithDelegate. #if defined(OS_WIN) #define MAYBE_TestBasicRecognition FLAKY_TestBasicRecognition #else |