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

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

Issue 14113053: chrome: Use base::MessageLoop. (Part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 13116309d6e9fab9d10fdd0adc35a10682bbeeb1..0997887018a89f7925ea85060764b12bbb3ee42b 100644
--- a/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc
+++ b/chrome/browser/speech/speech_recognition_bubble_controller_unittest.cc
@@ -34,7 +34,7 @@ class MockSpeechRecognitionBubble : public SpeechRecognitionBubbleBase {
const gfx::Rect&)
: SpeechRecognitionBubbleBase(web_contents) {
VLOG(1) << "MockSpeechRecognitionBubble created";
- MessageLoop::current()->PostTask(
+ base::MessageLoop::current()->PostTask(
FROM_HERE, base::Bind(&InvokeDelegate, delegate));
}
@@ -104,14 +104,14 @@ class SpeechRecognitionBubbleControllerTest
} else if (button == SpeechRecognitionBubble::BUTTON_TRY_AGAIN) {
try_again_clicked_ = true;
}
- message_loop()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ message_loop()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
}
virtual void InfoBubbleFocusChanged(int session_id) OVERRIDE {
VLOG(1) << "Received InfoBubbleFocusChanged";
EXPECT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::IO));
focus_changed_ = true;
- message_loop()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
+ message_loop()->PostTask(FROM_HERE, base::MessageLoop::QuitClosure());
}
// testing::Test methods.
@@ -143,8 +143,8 @@ class SpeechRecognitionBubbleControllerTest
// Set up to activate the bubble soon after it gets created, since we test
// events sent by the bubble and those are handled only when the bubble is
// active.
- MessageLoop::current()->PostTask(FROM_HERE,
- base::Bind(&ActivateBubble));
+ base::MessageLoop::current()->PostTask(FROM_HERE,
+ base::Bind(&ActivateBubble));
// The |web_contents| parameter would be NULL since the dummy session id
// passed to CreateBubble would not have matched any active tab. So get a
@@ -185,7 +185,7 @@ TEST_F(SpeechRecognitionBubbleControllerTest, TestFocusChanged) {
MockSpeechRecognitionBubble::BUBBLE_TEST_FOCUS_CHANGED);
controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(focus_changed_);
EXPECT_FALSE(cancel_clicked_);
EXPECT_FALSE(try_again_clicked_);
@@ -199,7 +199,7 @@ TEST_F(SpeechRecognitionBubbleControllerTest, TestRecognitionCancelled) {
MockSpeechRecognitionBubble::BUBBLE_TEST_CLICK_CANCEL);
controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_TRUE(cancel_clicked_);
EXPECT_FALSE(try_again_clicked_);
EXPECT_FALSE(focus_changed_);
@@ -213,7 +213,7 @@ TEST_F(SpeechRecognitionBubbleControllerTest, TestTryAgainClicked) {
MockSpeechRecognitionBubble::BUBBLE_TEST_CLICK_TRY_AGAIN);
controller_->CreateBubble(kBubbleSessionId, 1, 1, gfx::Rect(1, 1));
- MessageLoop::current()->Run();
+ base::MessageLoop::current()->Run();
EXPECT_FALSE(cancel_clicked_);
EXPECT_TRUE(try_again_clicked_);
EXPECT_FALSE(focus_changed_);

Powered by Google App Engine
This is Rietveld 408576698