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

Unified Diff: cc/test/ordered_simple_task_runner.cc

Issue 2383473002: [scheduler] Teach scheduler about audio state (Closed)
Patch Set: Rebased Created 4 years, 2 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
Index: cc/test/ordered_simple_task_runner.cc
diff --git a/cc/test/ordered_simple_task_runner.cc b/cc/test/ordered_simple_task_runner.cc
index a3d66ee6d3a58510e49557842b0498955f17fc83..9dc4bbcd2dacb680d586699576a632e286aab037 100644
--- a/cc/test/ordered_simple_task_runner.cc
+++ b/cc/test/ordered_simple_task_runner.cc
@@ -247,9 +247,11 @@ bool OrderedSimpleTaskRunner::RunUntilTime(base::TimeTicks time) {
// Run tasks
bool result = RunTasksWhile(NowBefore(time));
+ bool has_reached_task_limit = HasPendingTasks() && NextTaskTime() <= time;
+
// If the next task is after the stopping time and auto-advancing now, then
// force time to be the stopping time.
- if (!result && advance_now_ && now_src_->NowTicks() < time) {
+ if (!has_reached_task_limit && advance_now_ && now_src_->NowTicks() < time) {
now_src_->Advance(time - now_src_->NowTicks());
}
« no previous file with comments | « no previous file | content/browser/media/audio_stream_monitor.cc » ('j') | content/browser/web_contents/web_contents_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698