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

Unified Diff: components/scheduler/child/idle_helper_unittest.cc

Issue 1432263002: (reland) Adds TimeDomains to the TaskQueueManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix thread_hop_task DCHECK Created 5 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
« no previous file with comments | « components/scheduler/child/idle_helper.cc ('k') | components/scheduler/child/scheduler_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/scheduler/child/idle_helper_unittest.cc
diff --git a/components/scheduler/child/idle_helper_unittest.cc b/components/scheduler/child/idle_helper_unittest.cc
index b4f559bdf9745d92ba7e295875f7a35e0ca4b1a2..54c70e673953340e2d6e5df686182aca7c0221d1 100644
--- a/components/scheduler/child/idle_helper_unittest.cc
+++ b/components/scheduler/child/idle_helper_unittest.cc
@@ -7,6 +7,7 @@
#include "base/callback.h"
#include "base/test/simple_test_tick_clock.h"
#include "cc/test/ordered_simple_task_runner.h"
+#include "components/scheduler/base/real_time_domain.h"
#include "components/scheduler/base/task_queue.h"
#include "components/scheduler/base/task_queue_manager.h"
#include "components/scheduler/base/test_time_source.h"
@@ -844,8 +845,9 @@ TEST_F(IdleHelperTest, TestLongIdlePeriodPaused) {
idle_helper_->EnableLongIdlePeriod();
CheckIdlePeriodStateIs("in_long_idle_period_paused");
// There shouldn't be any delayed tasks posted by the idle helper when paused.
- EXPECT_EQ(base::TimeTicks(),
- scheduler_helper_->NextPendingDelayedTaskRunTime());
+ base::TimeTicks next_pending_delayed_task;
+ EXPECT_FALSE(scheduler_helper_->real_time_domain()->NextScheduledRunTime(
+ &next_pending_delayed_task));
// Posting a task should transition us to the an active state.
max_idle_task_reposts = 2;
@@ -865,8 +867,8 @@ TEST_F(IdleHelperTest, TestLongIdlePeriodPaused) {
// Once all task have been run we should go back to the paused state.
CheckIdlePeriodStateIs("in_long_idle_period_paused");
- EXPECT_EQ(base::TimeTicks(),
- scheduler_helper_->NextPendingDelayedTaskRunTime());
+ EXPECT_FALSE(scheduler_helper_->real_time_domain()->NextScheduledRunTime(
+ &next_pending_delayed_task));
idle_helper_->EndIdlePeriod();
CheckIdlePeriodStateIs("not_in_idle_period");
« no previous file with comments | « components/scheduler/child/idle_helper.cc ('k') | components/scheduler/child/scheduler_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698