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

Unified Diff: base/test/test_mock_time_task_runner.cc

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 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/threading/platform_thread_android.cc » ('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 6bcab8b91f3a52ee535fe5be8195134a16bd1a91..8cc2e6d5ff1f1366cb4574f5dc3608efd62fcb57 100644
--- a/base/test/test_mock_time_task_runner.cc
+++ b/base/test/test_mock_time_task_runner.cc
@@ -164,6 +164,10 @@ bool TestMockTimeTaskRunner::PostNonNestableDelayedTask(
return PostDelayedTask(from_here, task, delay);
}
+bool TestMockTimeTaskRunner::IsElapsingStopped() {
+ return false;
+}
+
void TestMockTimeTaskRunner::OnBeforeSelectingTask() {
// Empty default implementation.
}
@@ -179,7 +183,7 @@ void TestMockTimeTaskRunner::OnAfterTaskRun() {
void TestMockTimeTaskRunner::ProcessAllTasksNoLaterThan(TimeDelta max_delta) {
DCHECK_GE(max_delta, TimeDelta());
const TimeTicks original_now_ticks = now_ticks_;
- while (true) {
+ while (!IsElapsingStopped()) {
OnBeforeSelectingTask();
TestPendingTask task_info;
if (!DequeueNextTask(original_now_ticks, max_delta, &task_info))
« no previous file with comments | « base/test/test_mock_time_task_runner.h ('k') | base/threading/platform_thread_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698