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

Unified Diff: chrome/browser/metrics/thread_watcher_unittest.cc

Issue 1011683002: Lazily initialize MessageLoop for faster thread startup (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 7 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
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/sync/glue/sync_backend_registrar_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/thread_watcher_unittest.cc
diff --git a/chrome/browser/metrics/thread_watcher_unittest.cc b/chrome/browser/metrics/thread_watcher_unittest.cc
index 4b3c457a36baa839dd65c3b6b9161fc88d152adc..00171b8052257fba0f31b0854d259b2b9fb5df30 100644
--- a/chrome/browser/metrics/thread_watcher_unittest.cc
+++ b/chrome/browser/metrics/thread_watcher_unittest.cc
@@ -257,9 +257,9 @@ class ThreadWatcherTest : public ::testing::Test {
db_thread_.reset(new content::TestBrowserThread(BrowserThread::DB));
io_thread_.reset(new content::TestBrowserThread(BrowserThread::IO));
watchdog_thread_.reset(new WatchDogThread());
- db_thread_->Start();
- io_thread_->Start();
- watchdog_thread_->Start();
+ db_thread_->StartAndWaitForTesting();
+ io_thread_->StartAndWaitForTesting();
+ watchdog_thread_->StartAndWaitForTesting();
WatchDogThread::PostTask(
FROM_HERE,
@@ -691,7 +691,7 @@ TEST_F(ThreadWatcherListTest, Restart) {
content::TestBrowserThread ui_thread(BrowserThread::UI, &message_loop_for_ui);
scoped_ptr<WatchDogThread> watchdog_thread_(new WatchDogThread());
- watchdog_thread_->Start();
+ watchdog_thread_->StartAndWaitForTesting();
// See http://crbug.com/347887.
// StartWatchingAll() will PostDelayedTask to create g_thread_watcher_list_,
« no previous file with comments | « chrome/browser/io_thread.cc ('k') | chrome/browser/sync/glue/sync_backend_registrar_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698