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

Unified Diff: chrome/browser/speech/speech_recognizer_unittest.cc

Issue 3352018: Show error messages in speech bubble allowing user to retry as well. (Closed)
Patch Set: Address joth's comments. Created 10 years, 3 months 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
Index: chrome/browser/speech/speech_recognizer_unittest.cc
diff --git a/chrome/browser/speech/speech_recognizer_unittest.cc b/chrome/browser/speech/speech_recognizer_unittest.cc
index cb47b878a0fc79dd2d905ed926861ce3ea044377..9e1cf07a3385ca1e4c2cc84ae5707b716ca3bfc4 100644
--- a/chrome/browser/speech/speech_recognizer_unittest.cc
+++ b/chrome/browser/speech/speech_recognizer_unittest.cc
@@ -169,8 +169,8 @@ TEST_F(SpeechRecognizerTest, AudioControllerErrorNoData) {
ASSERT_TRUE(controller);
controller->event_handler()->OnError(controller, 0);
MessageLoop::current()->RunAllPending();
- EXPECT_TRUE(recording_complete_);
- EXPECT_TRUE(recognition_complete_);
+ EXPECT_FALSE(recording_complete_);
+ EXPECT_FALSE(recognition_complete_);
EXPECT_FALSE(result_received_);
EXPECT_EQ(SpeechRecognizer::RECOGNIZER_ERROR_CAPTURE, error_);
}
@@ -187,8 +187,8 @@ TEST_F(SpeechRecognizerTest, AudioControllerErrorWithData) {
controller->event_handler()->OnError(controller, 0);
MessageLoop::current()->RunAllPending();
EXPECT_EQ(NULL, url_fetcher_factory_.GetFetcherByID(0));
- EXPECT_TRUE(recording_complete_);
- EXPECT_TRUE(recognition_complete_);
+ EXPECT_FALSE(recording_complete_);
+ EXPECT_FALSE(recognition_complete_);
EXPECT_FALSE(result_received_);
EXPECT_EQ(SpeechRecognizer::RECOGNIZER_ERROR_CAPTURE, error_);
}
@@ -211,8 +211,8 @@ TEST_F(SpeechRecognizerTest, NoSpeechCallbackIssued) {
audio_packet_.size());
}
MessageLoop::current()->RunAllPending();
- EXPECT_TRUE(recording_complete_);
- EXPECT_TRUE(recognition_complete_);
+ EXPECT_FALSE(recording_complete_);
+ EXPECT_FALSE(recognition_complete_);
EXPECT_FALSE(result_received_);
EXPECT_EQ(SpeechRecognizer::RECOGNIZER_ERROR_NO_SPEECH, error_);
}

Powered by Google App Engine
This is Rietveld 408576698