summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/site_instance_unittest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/site_instance_unittest.cc b/chrome/browser/site_instance_unittest.cc
index 883de56..a59fc20 100644
--- a/chrome/browser/site_instance_unittest.cc
+++ b/chrome/browser/site_instance_unittest.cc
@@ -116,6 +116,10 @@ TEST_F(SiteInstanceTest, SiteInstanceDestructor) {
WebContents contents(profile.get(), instance, MSG_ROUTING_NONE, NULL);
EXPECT_EQ(1, siteDeleteCounter);
EXPECT_EQ(1, browsingDeleteCounter);
+
+ // Make sure that we flush any messages related to WebContents destruction
+ // before we destroy the profile.
+ MessageLoop::current()->RunAllPending();
}
EXPECT_EQ(2, siteDeleteCounter);