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

Unified Diff: components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc

Issue 2331423002: Replace TestSimpleTaskRunner::GetPendingTasks with TakePendingTasks (Closed)
Patch Set: split test Created 4 years, 3 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: components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc
diff --git a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc
index 36d095c473c2de2a63eda01e06dfc9dc0e051311..8df64b1bbd6d58f27415bec89f9bd9dad008a569 100644
--- a/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc
+++ b/components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc
@@ -72,10 +72,9 @@ class CloudPolicyRefreshSchedulerTest : public testing::Test {
}
base::TimeDelta GetLastDelay() const {
- const std::deque<base::TestPendingTask>& pending_tasks =
- task_runner_->GetPendingTasks();
- return
- pending_tasks.empty() ? base::TimeDelta() : pending_tasks.back().delay;
+ if (!task_runner_->HasPendingTask())
+ return base::TimeDelta();
+ return task_runner_->FinalPendingTaskDelay();
}
void CheckTiming(int64_t expected_delay_ms) const {

Powered by Google App Engine
This is Rietveld 408576698