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

Unified Diff: base/test/scoped_task_environment.cc

Issue 2876583002: Do not flush main thread tasks in ~ScopedTaskEnvironment. (Closed)
Patch Set: CR-gab-5-add-comment Created 3 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 | « base/test/scoped_task_environment.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_task_environment.cc
diff --git a/base/test/scoped_task_environment.cc b/base/test/scoped_task_environment.cc
index d1c0907c4b0d7e32ab411826fe006c98efc3a7d6..22ed28cd2c6f535b6049195583a1f7d1327ae3d3 100644
--- a/base/test/scoped_task_environment.cc
+++ b/base/test/scoped_task_environment.cc
@@ -55,8 +55,8 @@ ScopedTaskEnvironment::ScopedTaskEnvironment(MainThreadType main_thread_type)
}
ScopedTaskEnvironment::~ScopedTaskEnvironment() {
- RunLoop().RunUntilIdle();
-
+ // Intentionally do not RunLoop().RunUntilIdle() here as this simulates the
+ // replaced base::~MessageLoop() behaviour better.
DCHECK_EQ(TaskScheduler::GetInstance(), task_scheduler_);
// Without FlushForTesting(), DeleteSoon() and ReleaseSoon() tasks could be
// skipped, resulting in memory leaks.
« no previous file with comments | « base/test/scoped_task_environment.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698