summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/ui')
-rw-r--r--chrome/browser/ui/cocoa/browser_test_helper.cc5
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc11
2 files changed, 5 insertions, 11 deletions
diff --git a/chrome/browser/ui/cocoa/browser_test_helper.cc b/chrome/browser/ui/cocoa/browser_test_helper.cc
index 3e046e3..3aa8fe9 100644
--- a/chrome/browser/ui/cocoa/browser_test_helper.cc
+++ b/chrome/browser/ui/cocoa/browser_test_helper.cc
@@ -27,12 +27,15 @@ BrowserTestHelper::~BrowserTestHelper() {
// Delete the testing profile on the UI thread. But first release the
// browser, since it may trigger accesses to the profile upon destruction.
browser_.reset();
+ message_loop_.DeleteSoon(FROM_HERE, profile_.release());
+
+ // Make sure any pending tasks run before we destroy other threads.
+ message_loop_.RunAllPending();
// Drop any new tasks for the IO and FILE threads.
io_thread_.reset();
file_thread_.reset();
- message_loop_.DeleteSoon(FROM_HERE, profile_.release());
message_loop_.RunAllPending();
}
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
index 8fdcaa1..b055241 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_unittest.cc
@@ -9,16 +9,7 @@
#include "chrome/test/testing_profile.h"
#include "content/browser/browser_thread.h"
-class BookmarkBarViewTest : public BrowserWithTestWindowTest {
- public:
- BookmarkBarViewTest()
- : file_thread_(BrowserThread::FILE, message_loop()) {}
-
- private:
- BrowserThread file_thread_;
-
- DISALLOW_COPY_AND_ASSIGN(BookmarkBarViewTest);
-};
+typedef BrowserWithTestWindowTest BookmarkBarViewTest;
TEST_F(BookmarkBarViewTest, SwitchProfile) {
profile()->CreateBookmarkModel(true);