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

Unified Diff: ui/message_center/views/message_center_view_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | ui/shell_dialogs/select_file_dialog_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/message_center/views/message_center_view_unittest.cc
diff --git a/ui/message_center/views/message_center_view_unittest.cc b/ui/message_center/views/message_center_view_unittest.cc
index 3e18eada51eb1d0faa431ed293dab7158119ce93..f1a0d6049adad55d4e0d78a1ca102685100cde9d 100644
--- a/ui/message_center/views/message_center_view_unittest.cc
+++ b/ui/message_center/views/message_center_view_unittest.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/macros.h"
+#include "base/run_loop.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/message_center/fake_message_center.h"
@@ -229,7 +230,7 @@ void MessageCenterViewTest::SetUp() {
// Wait until the animation finishes if available.
if (GetAnimator()->IsAnimating())
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
}
void MessageCenterViewTest::TearDown() {
@@ -439,7 +440,7 @@ TEST_F(MessageCenterViewTest, SizeAfterUpdate) {
// Wait until the animation finishes if available.
if (GetAnimator()->IsAnimating())
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(2, GetMessageListView()->child_count());
EXPECT_EQ(GetMessageListView()->height(),
@@ -462,7 +463,7 @@ TEST_F(MessageCenterViewTest, SizeAfterRemove) {
// Wait until the animation finishes if available.
if (GetAnimator()->IsAnimating())
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(1, GetMessageListView()->child_count());
@@ -497,7 +498,7 @@ TEST_F(MessageCenterViewTest, PositionAfterUpdate) {
// Wait until the animation finishes if available.
if (GetAnimator()->IsAnimating())
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
// The vertical position of the target from bottom should be kept over change.
int current_vertical_pos_from_bottom =
@@ -525,7 +526,7 @@ TEST_F(MessageCenterViewTest, PositionAfterRemove) {
// Wait until the animation finishes if available.
if (GetAnimator()->IsAnimating())
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(1, GetMessageListView()->child_count());
@@ -556,7 +557,7 @@ TEST_F(MessageCenterViewTest, CloseButton) {
((views::ButtonListener*)GetButtonBar())
->ButtonPressed(close_button, DummyEvent());
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_TRUE(GetMessageCenter()->remove_all_closable_notification_called_);
}
@@ -569,14 +570,14 @@ TEST_F(MessageCenterViewTest, CloseButtonEnablity) {
EXPECT_TRUE(close_button->enabled());
RemoveNotification(kNotificationId1, false);
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
// There should be 1 non-pinned notification.
EXPECT_EQ(1u, GetMessageCenter()->GetVisibleNotifications().size());
EXPECT_TRUE(close_button->enabled());
RemoveNotification(kNotificationId2, false);
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
// There should be no notification.
EXPECT_EQ(0u, GetMessageCenter()->GetVisibleNotifications().size());
« no previous file with comments | « ui/keyboard/keyboard_controller_unittest.cc ('k') | ui/shell_dialogs/select_file_dialog_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698