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

Unified Diff: base/test/test_simple_task_runner.cc

Issue 17362002: cc: Remove FakeThread, use SingleThreadTaskRunner in scheduling classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rm-fakethread: rebase Created 7 years, 6 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_simple_task_runner.h ('k') | cc/base/thread.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_simple_task_runner.cc
diff --git a/base/test/test_simple_task_runner.cc b/base/test/test_simple_task_runner.cc
index 440d6a1cfe255f6240e42f6964cfe796d4a77399..cc39fab85ad3ecb8b1d7ee5f8d591a0f3669159b 100644
--- a/base/test/test_simple_task_runner.cc
+++ b/base/test/test_simple_task_runner.cc
@@ -47,6 +47,16 @@ TestSimpleTaskRunner::GetPendingTasks() const {
return pending_tasks_;
}
+bool TestSimpleTaskRunner::HasPendingTask() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return !pending_tasks_.empty();
+}
+
+base::TimeDelta TestSimpleTaskRunner::NextPendingTaskDelay() const {
+ DCHECK(thread_checker_.CalledOnValidThread());
+ return pending_tasks_.front().GetTimeToRun() - base::TimeTicks();
+}
+
void TestSimpleTaskRunner::ClearPendingTasks() {
DCHECK(thread_checker_.CalledOnValidThread());
pending_tasks_.clear();
« no previous file with comments | « base/test/test_simple_task_runner.h ('k') | cc/base/thread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698