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

Unified Diff: chrome/browser/profiles/profile_manager_unittest.cc

Issue 6627060: ImportantFileWriter: check return value of PostTask... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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
Index: chrome/browser/profiles/profile_manager_unittest.cc
===================================================================
--- chrome/browser/profiles/profile_manager_unittest.cc (revision 77440)
+++ chrome/browser/profiles/profile_manager_unittest.cc (working copy)
@@ -20,7 +20,9 @@
class ProfileManagerTest : public testing::Test {
protected:
- ProfileManagerTest() : ui_thread_(BrowserThread::UI, &message_loop_) {
+ ProfileManagerTest()
+ : ui_thread_(BrowserThread::UI, &message_loop_),
+ file_thread_(BrowserThread::FILE, &message_loop_) {
}
virtual void SetUp() {
@@ -40,6 +42,7 @@
MessageLoopForUI message_loop_;
BrowserThread ui_thread_;
+ BrowserThread file_thread_;
// the path to temporary directory used to contain the test operations
FilePath test_dir_;
@@ -140,8 +143,13 @@
EXPECT_TRUE(profile1->GetBookmarkModel());
EXPECT_TRUE(profile2->GetBookmarkModel());
EXPECT_TRUE(profile2->GetHistoryService(Profile::EXPLICIT_ACCESS));
+
+ // Make sure any pending tasks run before we destroy the profiles.
+ message_loop_.RunAllPending();
+
profile1.reset();
profile2.reset();
+
// Make sure history cleans up correctly.
message_loop_.RunAllPending();
}
« no previous file with comments | « chrome/browser/extensions/test_extension_prefs.cc ('k') | chrome/browser/sync/sync_setup_wizard_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698