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

Unified Diff: chrome/browser/chromeos/notifications/notification_browsertest.cc

Issue 1591004: RunAllPendingEvents -> ui_test_utils::RunAllPendingInMessageLoop (Closed)
Patch Set: " Created 10 years, 9 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 | « chrome/browser/chromeos/login/network_screen_browsertest.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/notifications/notification_browsertest.cc
diff --git a/chrome/browser/chromeos/notifications/notification_browsertest.cc b/chrome/browser/chromeos/notifications/notification_browsertest.cc
index 7524f83ace2b26c2c4b89ca32dfa483723d0d0fb..9b65e45d3384ed117bfae47f2475a1317a988737 100644
--- a/chrome/browser/chromeos/notifications/notification_browsertest.cc
+++ b/chrome/browser/chromeos/notifications/notification_browsertest.cc
@@ -78,14 +78,14 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestBasic) {
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
collection->Remove(NewMockNotification("1"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(1, tester->GetNewNotificationCount());
EXPECT_EQ(1, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
collection->Remove(NewMockNotification("2"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0, tester->GetNewNotificationCount());
EXPECT_EQ(0, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::CLOSED, tester->state());
@@ -110,13 +110,13 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestKeepSizeState) {
EXPECT_EQ(NotificationPanel::KEEP_SIZE, tester->state());
collection->Remove(NewMockNotification("1"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(1, tester->GetNewNotificationCount());
EXPECT_EQ(1, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::KEEP_SIZE, tester->state());
collection->Remove(NewMockNotification("2"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::CLOSED, tester->state());
@@ -124,7 +124,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestKeepSizeState) {
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
collection->Remove(NewMockNotification("3"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::CLOSED, tester->state());
}
@@ -153,7 +153,7 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestSystemNotification) {
// or Remove(std::string id);
collection->Remove(Notification(GURL(), GURL(),
std::wstring(), delegate.get()));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0, tester->GetStickyNotificationCount());
EXPECT_EQ(0, tester->GetNewNotificationCount());
@@ -176,15 +176,15 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition1) {
collection->Add(NewMockNotification("2"), browser()->profile());
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(NotificationPanel::MINIMIZED, tester->state());
collection->Remove(NewMockNotification("2"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(NotificationPanel::MINIMIZED, tester->state());
collection->Remove(NewMockNotification("1"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::CLOSED, tester->state());
}
@@ -205,13 +205,13 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) {
collection->Add(NewMockNotification("1"), browser()->profile());
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(NotificationPanel::MINIMIZED, tester->state());
collection->Add(NewMockNotification("2"), browser()->profile());
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(NotificationPanel::MINIMIZED, tester->state());
collection->AddSystemNotification(
@@ -219,20 +219,20 @@ IN_PROC_BROWSER_TEST_F(NotificationTest, TestStateTransition2) {
EXPECT_EQ(3, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
collection->Remove(NewMockNotification("1"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(NotificationPanel::STICKY_AND_NEW, tester->state());
collection->Remove(NewMockNotification("3"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(1, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::MINIMIZED, tester->state());
collection->Remove(NewMockNotification("2"));
- RunAllPendingEvents();
+ ui_test_utils::RunAllPendingInMessageLoop();
EXPECT_EQ(0, tester->GetNotificationCount());
EXPECT_EQ(NotificationPanel::CLOSED, tester->state());
}
« no previous file with comments | « chrome/browser/chromeos/login/network_screen_browsertest.cc ('k') | chrome/test/in_process_browser_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698