Chromium Code Reviews| Index: chrome/browser/speech/speech_input_browsertest.cc |
| diff --git a/chrome/browser/speech/speech_input_browsertest.cc b/chrome/browser/speech/speech_input_browsertest.cc |
| index 5563fe90993f3c00aa0a5bc0681ab5b52a06f181..fe6dec7397c6ff0b62d5a2f9dec33fb2479bada6 100644 |
| --- a/chrome/browser/speech/speech_input_browsertest.cc |
| +++ b/chrome/browser/speech/speech_input_browsertest.cc |
| @@ -42,13 +42,13 @@ 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) { |
| + 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) { |
| VLOG(1) << "StartRecognition invoked."; |
| EXPECT_EQ(0, caller_id_); |
| EXPECT_EQ(NULL, delegate_); |
| @@ -59,17 +59,21 @@ 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."; |
| + EXPECT_EQ(delegate_, delegate); |
| + } |
| private: |
| void SetFakeRecognitionResult() { |
| @@ -166,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 |
| +// the a renderer crashes, we get a call to |
|
bulach
2011/01/20 14:47:20
s/the //
Satish
2011/01/20 15:09:03
Done.
|
| +// SpeechInputManager::CancelAllRequestsWithDelegate. |
| #if defined(OS_WIN) |
| #define MAYBE_TestBasicRecognition FLAKY_TestBasicRecognition |
| #else |