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

Unified Diff: base/test/test_mock_time_task_runner.cc

Issue 895853003: Update from https://crrev.com/314320 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 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/test_mock_time_task_runner.h ('k') | base/test/test_pending_task.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_mock_time_task_runner.cc
diff --git a/base/test/test_mock_time_task_runner.cc b/base/test/test_mock_time_task_runner.cc
index 169839124d9e29f7ea60ab4f356020ebcb5fb0f0..442d99190b0b87060337b6b67d9d60f7f1d47051 100644
--- a/base/test/test_mock_time_task_runner.cc
+++ b/base/test/test_mock_time_task_runner.cc
@@ -102,6 +102,11 @@ bool TestMockTimeTaskRunner::HasPendingTask() const {
return !tasks_.empty();
}
+size_t TestMockTimeTaskRunner::GetPendingTaskCount() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return tasks_.size();
+}
+
TimeDelta TestMockTimeTaskRunner::NextPendingTaskDelay() const {
DCHECK(thread_checker_.CalledOnValidThread());
return tasks_.empty() ? TimeDelta::Max() : tasks_.top().GetTimeToRun() - now_;
« no previous file with comments | « base/test/test_mock_time_task_runner.h ('k') | base/test/test_pending_task.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698