Index: chrome/browser/profiles/profile_browsertest.cc |
diff --git a/chrome/browser/profiles/profile_browsertest.cc b/chrome/browser/profiles/profile_browsertest.cc |
index a12f51838071dbfec8b36dc3d9fc412a4da167b2..19a7e0d0dc433e8c9318cc7bd014e9ffa5554131 100644 |
--- a/chrome/browser/profiles/profile_browsertest.cc |
+++ b/chrome/browser/profiles/profile_browsertest.cc |
@@ -225,4 +225,11 @@ IN_PROC_BROWSER_TEST_F(ProfileBrowserTest, MAYBE_ExitType) { |
profile->SetExitType(Profile::EXIT_CRASHED); |
std::string final_value(prefs->GetString(prefs::kSessionExitType)); |
EXPECT_EQ(crash_value, final_value); |
+ |
+ // This test runs fast enough that the WebDataService may still be |
+ // initializing (which uses the temp directory) when the test |
+ // ends. Give it a chance to complete. |
+ profile.reset(); |
+ content::RunAllPendingInMessageLoop(); |
+ content::RunAllPendingInMessageLoop(content::BrowserThread::DB); |
} |