summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 05:00:37 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-11-14 05:00:37 +0000
commit1e664ad8f0375ed5c3ec925d095b4ccbe14dbe18 (patch)
tree1321660e11f64dce88ef70fe941f845b5ec8defd
parent5ef99bd93254cb61f9f3f4a43b19bc6c7c8cc139 (diff)
downloadchromium_src-1e664ad8f0375ed5c3ec925d095b4ccbe14dbe18.zip
chromium_src-1e664ad8f0375ed5c3ec925d095b4ccbe14dbe18.tar.gz
chromium_src-1e664ad8f0375ed5c3ec925d095b4ccbe14dbe18.tar.bz2
chrome/browser/ui: Update calls from RunAllPending() to RunUntilIdle().
BUG=131220 TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/11362229 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167597 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc2
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc2
-rw-r--r--chrome/browser/ui/cocoa/cocoa_profile_test.mm6
-rw-r--r--chrome/browser/ui/cocoa/importer/import_progress_dialog_cocoa.mm2
-rw-r--r--chrome/browser/ui/cocoa/menu_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm2
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc6
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc4
-rw-r--r--chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc2
-rw-r--r--chrome/browser/ui/gtk/panels/panel_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/reload_button_gtk_unittest.cc4
-rw-r--r--chrome/browser/ui/panels/base_panel_browser_test.cc2
-rw-r--r--chrome/browser/ui/panels/detached_panel_browsertest.cc8
-rw-r--r--chrome/browser/ui/panels/panel_and_desktop_notification_browsertest.cc58
-rw-r--r--chrome/browser/ui/panels/panel_browsertest.cc28
-rw-r--r--chrome/browser/ui/panels/panel_drag_browsertest.cc2
-rw-r--r--chrome/browser/ui/startup/startup_browser_creator_browsertest.cc4
-rw-r--r--chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc2
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc2
-rw-r--r--chrome/browser/ui/views/reload_button_unittest.cc4
21 files changed, 76 insertions, 76 deletions
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
index 05e1dcb..5b4231b 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_unittest.cc
@@ -74,7 +74,7 @@ class ChromeLauncherControllerTest : public testing::Test {
virtual void TearDown() OVERRIDE {
profile_.reset();
// Execute any pending deletion tasks.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
}
void InsertPrefValue(base::ListValue* pref_value,
diff --git a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
index 35941f0..94b9795 100644
--- a/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_context_menu_controller_unittest.cc
@@ -67,7 +67,7 @@ class BookmarkContextMenuControllerTest : public testing::Test {
ui::Clipboard::DestroyClipboardForCurrentThread();
// Flush the message loop to make application verifiers happy.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
protected:
diff --git a/chrome/browser/ui/cocoa/cocoa_profile_test.mm b/chrome/browser/ui/cocoa/cocoa_profile_test.mm
index ff1a029..94a14fb 100644
--- a/chrome/browser/ui/cocoa/cocoa_profile_test.mm
+++ b/chrome/browser/ui/cocoa/cocoa_profile_test.mm
@@ -31,7 +31,7 @@ CocoaProfileTest::~CocoaProfileTest() {
// browser, since it may trigger accesses to the profile upon destruction.
browser_.reset();
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
// Some services created on the TestingProfile require deletion on the UI
// thread. If the scoper in TestingBrowserProcess, owned by ChromeTestSuite,
// were to delete the ProfileManager, the UI thread would at that point no
@@ -40,14 +40,14 @@ CocoaProfileTest::~CocoaProfileTest() {
NULL);
// Make sure any pending tasks run before we destroy other threads.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
// Drop any new tasks for the IO and FILE threads.
io_thread_.reset();
file_user_blocking_thread_.reset();
file_thread_.reset();
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
void CocoaProfileTest::SetUp() {
diff --git a/chrome/browser/ui/cocoa/importer/import_progress_dialog_cocoa.mm b/chrome/browser/ui/cocoa/importer/import_progress_dialog_cocoa.mm
index c0f3fa0..d6cc7e2 100644
--- a/chrome/browser/ui/cocoa/importer/import_progress_dialog_cocoa.mm
+++ b/chrome/browser/ui/cocoa/importer/import_progress_dialog_cocoa.mm
@@ -208,7 +208,7 @@ void ShowImportProgressDialog(uint16 items,
while (true) {
if ([NSApp runModalSession:session] != NSRunContinuesResponse)
break;
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
}
[NSApp endModalSession:session];
}
diff --git a/chrome/browser/ui/cocoa/menu_controller_unittest.mm b/chrome/browser/ui/cocoa/menu_controller_unittest.mm
index 446a6569..035f92b 100644
--- a/chrome/browser/ui/cocoa/menu_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/menu_controller_unittest.mm
@@ -327,7 +327,7 @@ TEST_F(MenuControllerTest, OpenClose) {
EXPECT_FALSE(delegate.did_close_);
// Pump the task that notifies the delegate.
- message_loop.RunAllPending();
+ message_loop.RunUntilIdle();
// Expect that the delegate got notified properly.
EXPECT_TRUE(delegate.did_close_);
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
index bc34f54..accce9b 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller_unittest.mm
@@ -70,7 +70,7 @@ class BalloonControllerTest : public ChromeRenderViewHostTestHarness {
virtual void TearDown() {
collection_.reset();
browser_.reset();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
ChromeRenderViewHostTestHarness::TearDown();
}
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
index 8aba20b..decd6bf 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -976,7 +976,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) {
chrome::ShowFindBar(browser());
// This is needed on GTK because the reposition operation is asynchronous.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
gfx::Point start_position;
gfx::Point position;
@@ -1415,12 +1415,12 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_FitWindow) {
popup->window()->Show();
// On GTK, bounds change is asynchronous.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EnsureFindBoxOpenForBrowser(popup);
// GTK adjusts FindBar size asynchronously.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
ASSERT_LE(GetFindBarWidthForBrowser(popup),
popup->window()->GetBounds().width());
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc
index 45ac0ff3..5739c6e 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_interactive_uitest.cc
@@ -44,7 +44,7 @@ IN_PROC_BROWSER_TEST_F(BookmarkBarGtkInteractiveUITest, FindBarTest) {
chrome::ActivateTabAt(browser(), 1, false);
// Wait for the findbar to show.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
// Set focus somewhere else, so that we can test clicking on the findbar
// works.
@@ -70,7 +70,7 @@ IN_PROC_BROWSER_TEST_F(
chrome::NewTab(browser());
// Wait for the floating bar to appear.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
// This is kind of a hack. Calling this just once doesn't seem to send a click
// event, but doing it twice works.
diff --git a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc
index 3511006..096435c 100644
--- a/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/bookmarks/bookmark_bar_gtk_unittest.cc
@@ -48,7 +48,7 @@ class BookmarkBarGtkUnittest : public testing::Test {
}
virtual void TearDown() OVERRIDE {
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
bookmark_bar_.reset();
origin_provider_.reset();
diff --git a/chrome/browser/ui/gtk/panels/panel_gtk.cc b/chrome/browser/ui/gtk/panels/panel_gtk.cc
index c9f305f..4b8f6ae 100644
--- a/chrome/browser/ui/gtk/panels/panel_gtk.cc
+++ b/chrome/browser/ui/gtk/panels/panel_gtk.cc
@@ -1061,7 +1061,7 @@ void GtkNativePanelTesting::PressLeftMouseButtonTitlebar(
panel_gtk_->OnTitlebarButtonPressEvent(
NULL, reinterpret_cast<GdkEventButton*>(event));
gdk_event_free(event);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::ReleaseMouseButtonTitlebar(
@@ -1078,7 +1078,7 @@ void GtkNativePanelTesting::ReleaseMouseButtonTitlebar(
NULL, reinterpret_cast<GdkEventButton*>(event));
}
gdk_event_free(event);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::DragTitlebar(const gfx::Point& mouse_location) {
@@ -1090,14 +1090,14 @@ void GtkNativePanelTesting::DragTitlebar(const gfx::Point& mouse_location) {
panel_gtk_->drag_helper_->OnMouseMoveEvent(
NULL, reinterpret_cast<GdkEventMotion*>(event));
gdk_event_free(event);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::CancelDragTitlebar() {
if (!panel_gtk_->drag_helper_.get())
return;
panel_gtk_->drag_helper_->OnGrabBrokenEvent(NULL, NULL);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
}
void GtkNativePanelTesting::FinishDragTitlebar() {
diff --git a/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc b/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc
index 6a612d8..f096bdb 100644
--- a/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc
+++ b/chrome/browser/ui/gtk/reload_button_gtk_unittest.cc
@@ -94,7 +94,7 @@ TEST_F(ReloadButtonGtkTest, DoubleClickTimer) {
true, false);
// Now fire the timer. This should complete the mode change.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
CheckState(true, ReloadButtonGtk::MODE_STOP, ReloadButtonGtk::MODE_STOP,
false, false);
}
@@ -139,7 +139,7 @@ TEST_F(ReloadButtonGtkTest, ResetOnTimer) {
reload_.ChangeMode(ReloadButtonGtk::MODE_RELOAD, false);
// Now fire the stop-to-reload timer. This should reset the button.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
CheckState(true, ReloadButtonGtk::MODE_RELOAD, ReloadButtonGtk::MODE_RELOAD,
false, false);
}
diff --git a/chrome/browser/ui/panels/base_panel_browser_test.cc b/chrome/browser/ui/panels/base_panel_browser_test.cc
index 3898969..3276240 100644
--- a/chrome/browser/ui/panels/base_panel_browser_test.cc
+++ b/chrome/browser/ui/panels/base_panel_browser_test.cc
@@ -322,7 +322,7 @@ Panel* BasePanelBrowserTest::CreatePanelWithParams(
}
if (params.wait_for_fully_created) {
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
#if defined(OS_LINUX)
// On bots, we might have a simple window manager which always activates new
diff --git a/chrome/browser/ui/panels/detached_panel_browsertest.cc b/chrome/browser/ui/panels/detached_panel_browsertest.cc
index 1423dae..edd36e3e 100644
--- a/chrome/browser/ui/panels/detached_panel_browsertest.cc
+++ b/chrome/browser/ui/panels/detached_panel_browsertest.cc
@@ -57,7 +57,7 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, DrawAttentionOnActive) {
EXPECT_FALSE(panel->IsDrawingAttention());
panel->FlashFrame(true);
EXPECT_FALSE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(native_panel_testing->VerifyDrawingAttention());
panel->Close();
@@ -78,13 +78,13 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest,
EXPECT_FALSE(panel->IsDrawingAttention());
panel->FlashFrame(true);
EXPECT_TRUE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(native_panel_testing->VerifyDrawingAttention());
// Stop drawing attention.
panel->FlashFrame(false);
EXPECT_FALSE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(native_panel_testing->VerifyDrawingAttention());
PanelManager::GetInstance()->CloseAll();
@@ -105,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(DetachedPanelBrowserTest, DrawAttentionResetOnActivate) {
// Test that the attention is drawn when the detached panel is not in focus.
panel1->FlashFrame(true);
EXPECT_TRUE(panel1->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(native_panel_testing->VerifyDrawingAttention());
// Test that the attention is cleared when panel gets focus.
diff --git a/chrome/browser/ui/panels/panel_and_desktop_notification_browsertest.cc b/chrome/browser/ui/panels/panel_and_desktop_notification_browsertest.cc
index d646f3a..9e9a9db 100644
--- a/chrome/browser/ui/panels/panel_and_desktop_notification_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_and_desktop_notification_browsertest.cc
@@ -21,7 +21,7 @@
// Desktop notification code subscribes to various panel change notifications
// so that it knows when to adjusts balloon positions. In order to give
// desktop notification code a chance to process the change notifications,
-// we call MessageLoopForUI::current()->RunAllPending() after any panel change
+// we call MessageLoopForUI::current()->RunUntilIdle() after any panel change
// has been made.
class PanelAndDesktopNotificationTest : public BasePanelBrowserTest {
public:
@@ -49,7 +49,7 @@ class PanelAndDesktopNotificationTest : public BasePanelBrowserTest {
virtual void CleanUpOnMainThread() OVERRIDE {
balloons_->RemoveAll();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
service_.reset();
ui_manager_.reset();
@@ -74,7 +74,7 @@ class PanelAndDesktopNotificationTest : public BasePanelBrowserTest {
StandardTestNotification();
EXPECT_TRUE(service()->ShowDesktopNotification(
params, 0, 0, DesktopNotificationService::PageNotification));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
return balloons().front();
}
@@ -127,7 +127,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, AddAndClosePanel) {
// Create a docked panel. Expect that the notification balloon moves up to be
// above the panel.
Panel* panel = CreateDockedPanel("1", gfx::Rect(0, 0, 200, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom, panel->GetBounds().y());
EXPECT_LT(balloon_bottom, original_balloon_bottom);
@@ -135,7 +135,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, AddAndClosePanel) {
// Close the panel. Expect the notification balloon moves back to its original
// position.
panel->Close();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon));
}
@@ -146,14 +146,14 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest,
// Create a docked panel. Expect that the notification balloon moves up to be
// above the panel.
Panel* panel = CreateDockedPanel("1", gfx::Rect(0, 0, 200, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_on_expanded = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_on_expanded, panel->GetBounds().y());
// Minimize the panel. Expect that the notification balloon moves down, but
// still above the minimized panel.
panel->Minimize();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_on_minimized = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_on_minimized, panel->GetBounds().y());
EXPECT_LT(balloon_bottom_on_expanded, balloon_bottom_on_minimized);
@@ -162,7 +162,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest,
// notification balloon moves up a little bit to be still above the title-only
// panel.
panel->FlashFrame(true);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_on_title_only = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_on_title_only, panel->GetBounds().y());
EXPECT_LT(balloon_bottom_on_title_only, balloon_bottom_on_minimized);
@@ -171,7 +171,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest,
// Expand the panel. Expect that the notification balloon moves up to go back
// to the same position when the panel is expanded.
panel->Restore();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(balloon_bottom_on_expanded, GetBalloonBottomPosition(balloon));
PanelManager::GetInstance()->CloseAll();
@@ -188,14 +188,14 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, DragNarrowPanel) {
Panel* tall_panel = CreateDockedPanel("1", gfx::Rect(0, 0, panel_width, 300));
Panel* short_panel = CreateDockedPanel(
"2", gfx::Rect(0, 0, panel_width, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom, tall_panel->GetBounds().y());
// Swap 2 docked panels by dragging. Expect that the notificaition balloon
// remains at the same position.
DragPanelToMouseLocation(tall_panel, short_panel->GetBounds().origin());
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(balloon_bottom, GetBalloonBottomPosition(balloon));
PanelManager::GetInstance()->CloseAll();
@@ -212,14 +212,14 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, DragWidePanel) {
Panel* tall_panel = CreateDockedPanel("1", gfx::Rect(0, 0, panel_width, 300));
Panel* short_panel = CreateDockedPanel(
"2", gfx::Rect(0, 0, panel_width, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_before_drag = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_before_drag, tall_panel->GetBounds().y());
// Swap 2 docked panels by dragging. Expect that the notificaiton balloon
// moves down to be just above the short panel.
DragPanelToMouseLocation(tall_panel, short_panel->GetBounds().origin());
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_drag = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_after_drag, short_panel->GetBounds().y());
EXPECT_LT(balloon_bottom_before_drag, balloon_bottom_after_drag);
@@ -235,7 +235,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, DetachAndAttachPanel) {
// Create a docked panel. Expect that the notification balloon moves up to be
// above the panel.
Panel* panel = CreateDockedPanel("1", gfx::Rect(0, 0, 200, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_panel_created = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_after_panel_created, panel->GetBounds().y());
EXPECT_LT(balloon_bottom_after_panel_created, original_balloon_bottom);
@@ -244,7 +244,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, DetachAndAttachPanel) {
// original position.
panel_manager->MovePanelToStrip(
panel, PanelStrip::DETACHED, PanelStrip::DEFAULT_POSITION);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(PanelStrip::DETACHED, panel->panel_strip()->type());
EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon));
@@ -252,7 +252,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, DetachAndAttachPanel) {
// panel.
panel_manager->MovePanelToStrip(
panel, PanelStrip::DOCKED, PanelStrip::DEFAULT_POSITION);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(PanelStrip::DOCKED, panel->panel_strip()->type());
EXPECT_EQ(balloon_bottom_after_panel_created,
GetBalloonBottomPosition(balloon));
@@ -267,7 +267,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, ResizePanel) {
// Create a docked panel. Expect that the notification balloon moves up to be
// above the panel.
Panel* panel = CreateDockedPanel("1", gfx::Rect(0, 0, 200, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom = GetBalloonBottomPosition(balloon);
gfx::Rect original_bounds = panel->GetBounds();
EXPECT_LT(balloon_bottom, original_bounds.y());
@@ -279,7 +279,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, ResizePanel) {
new_bounds.set_width(new_bounds.width() + resize_delta.x());
new_bounds.set_height(new_bounds.height() + resize_delta.y());
panel->SetBounds(new_bounds);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom2 = GetBalloonBottomPosition(balloon);
EXPECT_EQ(balloon_bottom - resize_delta.y(), balloon_bottom2);
@@ -289,7 +289,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, ResizePanel) {
new_bounds.set_width(new_bounds.width() + resize_delta.x());
new_bounds.set_height(new_bounds.height() + resize_delta.y());
panel->SetBounds(new_bounds);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom3 = GetBalloonBottomPosition(balloon);
EXPECT_EQ(balloon_bottom2 - resize_delta.y(), balloon_bottom3);
@@ -302,7 +302,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, ResizePanelByMouse) {
// Create a docked panel. Expect that the notification balloon moves up to be
// above the panel.
Panel* panel = CreateDockedPanel("1", gfx::Rect(0, 0, 200, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom = GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom, panel->GetBounds().y());
@@ -310,7 +310,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, ResizePanelByMouse) {
// moves further up by the amount of enlarge offset.
gfx::Vector2d drag_delta(-50, -100);
ResizePanelByMouseWithDelta(panel, panel::RESIZE_TOP_LEFT, drag_delta);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom2 = GetBalloonBottomPosition(balloon);
EXPECT_EQ(balloon_bottom + drag_delta.y(), balloon_bottom2);
@@ -318,7 +318,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, ResizePanelByMouse) {
// moves down by the amount of shrink offset.
drag_delta = gfx::Vector2d(0, 60);
ResizePanelByMouseWithDelta(panel, panel::RESIZE_TOP, drag_delta);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom3 = GetBalloonBottomPosition(balloon);
EXPECT_EQ(balloon_bottom2 + drag_delta.y(), balloon_bottom3);
@@ -336,7 +336,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, InteractWithTwoPanels) {
// above the short panel.
Panel* short_panel = CreateDockedPanel(
"1", gfx::Rect(0, 0, panel_width, 150));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_short_panel_created =
GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_after_short_panel_created,
@@ -346,7 +346,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, InteractWithTwoPanels) {
// Create a tall panel. Expect that the notification balloon moves further up
// to be above the tall panel.
Panel* tall_panel = CreateDockedPanel("2", gfx::Rect(0, 0, panel_width, 200));
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_tall_panel_created =
GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_after_tall_panel_created,
@@ -357,7 +357,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, InteractWithTwoPanels) {
// Minimize tall panel. Expect that the notification balloon moves down to the
// same position when short panel is first created.
tall_panel->Minimize();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_tall_panel_minimized =
GetBalloonBottomPosition(balloon);
EXPECT_EQ(balloon_bottom_after_short_panel_created,
@@ -366,7 +366,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, InteractWithTwoPanels) {
// Minimize short panel. Expect that the notification balloon moves further
// down.
short_panel->Minimize();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_both_panels_minimized =
GetBalloonBottomPosition(balloon);
EXPECT_LT(balloon_bottom_after_both_panels_minimized,
@@ -381,7 +381,7 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, InteractWithTwoPanels) {
// Expand short panel. Expect that the notification balloon moves further up
// to the same position when short panel is first created.
short_panel->Restore();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
int balloon_bottom_after_short_panel_expanded =
GetBalloonBottomPosition(balloon);
EXPECT_EQ(balloon_bottom_after_short_panel_created,
@@ -390,13 +390,13 @@ IN_PROC_BROWSER_TEST_F(PanelAndDesktopNotificationTest, InteractWithTwoPanels) {
// Close tall panel. Expect that the notification balloon moves down to the
// same position when short panel is first created.
tall_panel->Close();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(balloon_bottom_after_short_panel_created,
GetBalloonBottomPosition(balloon));
// Close short panel. Expect that the notification balloo moves back to its
// original position.
short_panel->Close();
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(original_balloon_bottom, GetBalloonBottomPosition(balloon));
}
diff --git a/chrome/browser/ui/panels/panel_browsertest.cc b/chrome/browser/ui/panels/panel_browsertest.cc
index d178276..e7b8250 100644
--- a/chrome/browser/ui/panels/panel_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_browsertest.cc
@@ -273,7 +273,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, CheckDockedPanelProperties) {
// Ensure that the layout message can get a chance to be processed so that
// the button visibility can be updated.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_EQ(3, panel_manager->num_panels());
EXPECT_TRUE(docked_strip->HasPanel(panel1));
@@ -908,7 +908,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) {
mock_display_settings_provider()->SetDesktopBarThickness(
DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_RIGHT,
right_bar_thickness);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(
initial_starting_right_position - docked_strip->StartingRightPosition(),
right_bar_thickness_delta);
@@ -928,7 +928,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, ChangeAutoHideTaskBarThickness) {
mock_display_settings_provider()->SetDesktopBarThickness(
DisplaySettingsProvider::DESKTOP_BAR_ALIGNED_RIGHT,
right_bar_thickness);
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
EXPECT_EQ(
docked_strip->StartingRightPosition() - initial_starting_right_position,
right_bar_thickness_delta);
@@ -1036,13 +1036,13 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionBasic) {
EXPECT_FALSE(panel->IsDrawingAttention());
panel->FlashFrame(true);
EXPECT_TRUE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(native_panel_testing->VerifyDrawingAttention());
// Stop drawing attention.
panel->FlashFrame(false);
EXPECT_FALSE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(native_panel_testing->VerifyDrawingAttention());
// Draw attention, then minimize. Titlebar should remain visible.
@@ -1078,7 +1078,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionWhileMinimized) {
panel->FlashFrame(true);
EXPECT_TRUE(panel->IsDrawingAttention());
EXPECT_EQ(Panel::TITLE_ONLY, panel->expansion_state());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(native_panel_testing->VerifyDrawingAttention());
// Test that we cannot bring up other minimized panel if the mouse is over
@@ -1096,7 +1096,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionWhileMinimized) {
// Test that the attention is cleared when activated.
panel->Activate();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
EXPECT_FALSE(panel->IsDrawingAttention());
EXPECT_EQ(Panel::EXPANDED, panel->expansion_state());
@@ -1192,7 +1192,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionWhenActive) {
EXPECT_FALSE(panel->IsDrawingAttention());
panel->FlashFrame(true);
EXPECT_FALSE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_FALSE(native_panel_testing->VerifyDrawingAttention());
panel->Close();
@@ -1210,12 +1210,12 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionResetOnActivate) {
panel->FlashFrame(true);
EXPECT_TRUE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(native_panel_testing->VerifyDrawingAttention());
// Test that the attention is cleared when panel gets focus.
panel->Activate();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
EXPECT_FALSE(panel->IsDrawingAttention());
EXPECT_FALSE(native_panel_testing->VerifyDrawingAttention());
@@ -1267,7 +1267,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionResetOnClick) {
panel->FlashFrame(true);
EXPECT_TRUE(panel->IsDrawingAttention());
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
EXPECT_TRUE(native_panel_testing->VerifyDrawingAttention());
// Test that the attention is cleared when panel gets focus.
@@ -1275,7 +1275,7 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest, DrawAttentionResetOnClick) {
panel->GetBounds().origin());
native_panel_testing->ReleaseMouseButtonTitlebar();
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel, SHOW_AS_ACTIVE);
EXPECT_FALSE(panel->IsDrawingAttention());
EXPECT_FALSE(native_panel_testing->VerifyDrawingAttention());
@@ -1362,12 +1362,12 @@ IN_PROC_BROWSER_TEST_F(PanelBrowserTest,
WaitForPanelActiveState(panel1, SHOW_AS_ACTIVE);
panel1->SetExpansionState(Panel::MINIMIZED);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel1, SHOW_AS_INACTIVE);
EXPECT_EQ(Panel::MINIMIZED, panel1->expansion_state());
panel2->SetExpansionState(Panel::MINIMIZED);
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
WaitForPanelActiveState(panel2, SHOW_AS_INACTIVE);
EXPECT_EQ(Panel::MINIMIZED, panel2->expansion_state());
diff --git a/chrome/browser/ui/panels/panel_drag_browsertest.cc b/chrome/browser/ui/panels/panel_drag_browsertest.cc
index a9ceddf..8799bca 100644
--- a/chrome/browser/ui/panels/panel_drag_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_drag_browsertest.cc
@@ -1257,7 +1257,7 @@ IN_PROC_BROWSER_TEST_F(PanelDragBrowserTest, AttachWithSqueeze) {
EXPECT_EQ(detached_position2, panel2->GetBounds().origin());
// Wait for active states to settle.
- MessageLoopForUI::current()->RunAllPending();
+ MessageLoopForUI::current()->RunUntilIdle();
// Panel positions should have shifted because of the "squeeze" mode.
EXPECT_NE(docked_position4, panel4->GetBounds().origin());
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index 6c51fbf..a398f10 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -464,7 +464,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, UpdateWithTwoProfiles) {
while (SessionRestore::IsRestoring(profile1) ||
SessionRestore::IsRestoring(profile2))
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
// The startup URLs are ignored, and instead the last open sessions are
// restored.
@@ -552,7 +552,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
SessionRestore::IsRestoring(profile_home2) ||
SessionRestore::IsRestoring(profile_last) ||
SessionRestore::IsRestoring(profile_urls))
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
Browser* new_browser = NULL;
// The last open profile (the profile_home1 in this case) will always be
diff --git a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
index 4aa9ae7..f464cdf 100644
--- a/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
+++ b/chrome/browser/ui/views/accessibility/accessibility_event_router_views_unittest.cc
@@ -113,7 +113,7 @@ class AccessibilityEventRouterViewsTest
// The Widget's FocusManager is deleted using DeleteSoon - this
// forces it to be deleted now, so we don't have any memory leaks
// when this method exits.
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
#if defined(OS_WIN)
ole_initializer_.reset();
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 0c2ef75..6983c8a 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -914,7 +914,7 @@ class BookmarkBarViewTest10 : public BookmarkBarViewEventTestBase {
ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::LEFT,
ui_controls::DOWN | ui_controls::UP,
CreateEventTask(this, &BookmarkBarViewTest10::Step2));
- MessageLoop::current()->RunAllPending();
+ MessageLoop::current()->RunUntilIdle();
}
private:
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
index 3bfad84..7e461e9 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_context_menu_test.cc
@@ -79,7 +79,7 @@ class BookmarkContextMenuTest : public testing::Test {
BrowserThread::GetBlockingPool()->FlushForTesting();
// Flush the message loop to make application verifiers happy.
- message_loop_.RunAllPending();
+ message_loop_.RunUntilIdle();
}
protected:
diff --git a/chrome/browser/ui/views/reload_button_unittest.cc b/chrome/browser/ui/views/reload_button_unittest.cc
index 34234b3..3db8488 100644
--- a/chrome/browser/ui/views/reload_button_unittest.cc
+++ b/chrome/browser/ui/views/reload_button_unittest.cc
@@ -95,7 +95,7 @@ TEST_F(ReloadButtonTest, DoubleClickTimer) {
false);
// Now fire the timer. This should complete the mode change.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
CheckState(true, ReloadButton::MODE_STOP, ReloadButton::MODE_STOP, false,
false);
}
@@ -144,7 +144,7 @@ TEST_F(ReloadButtonTest, ResetOnTimer) {
reload_.ChangeMode(ReloadButton::MODE_RELOAD, false);
// Now fire the stop-to-reload timer. This should reset the button.
- loop_.RunAllPending();
+ loop_.RunUntilIdle();
CheckState(true, ReloadButton::MODE_RELOAD, ReloadButton::MODE_RELOAD, false,
false);
}