Index: views/controls/tabbed_pane/tabbed_pane_unittest.cc |
diff --git a/views/controls/tabbed_pane/tabbed_pane_unittest.cc b/views/controls/tabbed_pane/tabbed_pane_unittest.cc |
index 51a4acb3abbc563a53ff7968e29f180b72bdcebd..1ceef86fd10509cba1d30f679ac06d5c21cb07c4 100644 |
--- a/views/controls/tabbed_pane/tabbed_pane_unittest.cc |
+++ b/views/controls/tabbed_pane/tabbed_pane_unittest.cc |
@@ -32,6 +32,10 @@ class TabbedPaneTest : public testing::Test, WindowDelegate { |
TabbedPane* tabbed_pane_; |
+ void RunAllPending() { |
+ message_loop_.RunAllPending(); |
+ } |
+ |
private: |
virtual void SetUp() { |
tabbed_pane_ = new TabbedPane(); |
@@ -69,6 +73,7 @@ TEST_F(TabbedPaneTest, SizeAndLayout) { |
// The bounds of our children should be smaller than the tabbed pane's bounds. |
tabbed_pane_->SetBounds(0, 0, 100, 200); |
+ RunAllPending(); |
gfx::Rect bounds(child1->bounds()); |
EXPECT_GT(bounds.width(), 0); |
EXPECT_LT(bounds.width(), 100); |