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

Unified Diff: base/threading/sequenced_worker_pool_unittest.cc

Issue 2511473004: Create base::test::ScopedTaskScheduler. (Closed)
Patch Set: self-review Created 4 years, 1 month 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
« base/test/scoped_task_scheduler.cc ('K') | « base/test/scoped_task_scheduler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/threading/sequenced_worker_pool_unittest.cc
diff --git a/base/threading/sequenced_worker_pool_unittest.cc b/base/threading/sequenced_worker_pool_unittest.cc
index 5782af7e767b631bffcb0c3551895ea9a55a2d02..f4f9e600111e7a3308167e30235b20e29305a740 100644
--- a/base/threading/sequenced_worker_pool_unittest.cc
+++ b/base/threading/sequenced_worker_pool_unittest.cc
@@ -287,8 +287,7 @@ class SequencedWorkerPoolTest
// Destroys and unregisters the registered TaskScheduler, if any.
void DeleteTaskScheduler() {
if (TaskScheduler::GetInstance()) {
- static_cast<internal::TaskSchedulerImpl*>(TaskScheduler::GetInstance())
- ->JoinForTesting();
+ TaskScheduler::GetInstance()->JoinForTesting();
robliao 2016/11/16 21:23:05 Should this test instead use a scoped_ptr<ScopedTa
gab 2016/11/16 21:29:19 Being a scheduler test it should probably still te
robliao 2016/11/16 21:31:31 Now that I think about it, is there any harm in al
gab 2016/11/16 21:38:15 We could definitely have an alternate constructor
fdoray 2016/11/16 22:04:45 Discussed offline. Custom thread count is only use
TaskScheduler::SetInstance(nullptr);
}
}
« base/test/scoped_task_scheduler.cc ('K') | « base/test/scoped_task_scheduler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698