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

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

Issue 10663018: Changing tab closure handling logic in speech recognition code and cleaning bubble controller. (Spe… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Slight refactor to fix a bug on mac + rebase Created 8 years, 6 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_recognition_bubble_controller_unittest.cc
diff --git a/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc b/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc
index 83f3decc7c9621d3f83b30800104d02e2ec7f0f3..c63b32cd91f14f3de9f6bb02a32a935730090260 100644
--- a/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc
+++ b/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc
@@ -127,12 +127,9 @@ class SpeechRecognitionBubbleControllerTest
}
static void ActivateBubble() {
- if (MockSpeechRecognitionBubble::type() ==
+ if (MockSpeechRecognitionBubble::type() !=
MockSpeechRecognitionBubble::BUBBLE_TEST_FOCUS_CHANGED) {
- test_fixture_->controller_->SetBubbleWarmUpMode(kBubbleSessionId);
- } else {
- test_fixture_->controller_->SetBubbleMessage(kBubbleSessionId,
- ASCIIToUTF16("Test"));
+ test_fixture_->controller_->SetBubbleMessage(ASCIIToUTF16("Test"));
}
}
@@ -192,7 +189,7 @@ TEST_F(SpeechRecognitionBubbleControllerTest, TestFocusChanged) {
EXPECT_TRUE(focus_changed_);
EXPECT_FALSE(cancel_clicked_);
EXPECT_FALSE(try_again_clicked_);
- controller_->CloseBubble(kBubbleSessionId);
+ controller_->CloseBubble();
}
// Test that the speech bubble UI gets created in the UI thread and that the
@@ -206,7 +203,7 @@ TEST_F(SpeechRecognitionBubbleControllerTest, TestRecognitionCancelled) {
EXPECT_TRUE(cancel_clicked_);
EXPECT_FALSE(try_again_clicked_);
EXPECT_FALSE(focus_changed_);
- controller_->CloseBubble(kBubbleSessionId);
+ controller_->CloseBubble();
}
// Test that the speech bubble UI gets created in the UI thread and that the
@@ -220,7 +217,7 @@ TEST_F(SpeechRecognitionBubbleControllerTest, TestTryAgainClicked) {
EXPECT_FALSE(cancel_clicked_);
EXPECT_TRUE(try_again_clicked_);
EXPECT_FALSE(focus_changed_);
- controller_->CloseBubble(kBubbleSessionId);
+ controller_->CloseBubble();
}
} // namespace speech

Powered by Google App Engine
This is Rietveld 408576698