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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc

Issue 2653643002: Move has_incoming_immediate_work to the TaskQueueManager (Closed)
Patch Set: Don't try to be quite so clever in TaskQueueManager::ComputeDelayTillNextTask Created 3 years, 11 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 | « third_party/WebKit/Source/platform/scheduler/base/time_domain.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc b/third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc
index 65fc020c7d5d4c6e235b823c3b6ece0d9c934c6f..f8eaf85248b9d070cb12a7625f0a2f9b0e84ded5 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain_unittest.cc
@@ -33,10 +33,10 @@ class MockTimeDomain : public TimeDomain {
using TimeDomain::CancelDelayedWork;
using TimeDomain::NextScheduledRunTime;
using TimeDomain::NextScheduledTaskQueue;
- using TimeDomain::OnQueueHasIncomingImmediateWork;
+ using TimeDomain::OnQueueHasImmediateWork;
using TimeDomain::ScheduleDelayedWork;
using TimeDomain::UnregisterQueue;
- using TimeDomain::UpdateWorkQueues;
+ using TimeDomain::WakeupReadyDelayedQueues;
// TimeSource implementation:
LazyNow CreateLazyNow() const override { return LazyNow(now_); }
@@ -195,7 +195,7 @@ TEST_F(TimeDomainTest, UnregisterQueue) {
EXPECT_FALSE(time_domain_->NextScheduledTaskQueue(&next_task_queue));
}
-TEST_F(TimeDomainTest, UpdateWorkQueues) {
+TEST_F(TimeDomainTest, WakeupReadyDelayedQueues) {
base::TimeDelta delay = base::TimeDelta::FromMilliseconds(50);
EXPECT_CALL(*time_domain_.get(), RequestWakeup(_, delay));
base::TimeTicks now = time_domain_->Now();
@@ -207,13 +207,13 @@ TEST_F(TimeDomainTest, UpdateWorkQueues) {
EXPECT_EQ(delayed_runtime, next_run_time);
LazyNow lazy_now = time_domain_->CreateLazyNow();
- time_domain_->UpdateWorkQueues(&lazy_now);
+ time_domain_->WakeupReadyDelayedQueues(&lazy_now);
ASSERT_TRUE(time_domain_->NextScheduledRunTime(&next_run_time));
EXPECT_EQ(delayed_runtime, next_run_time);
time_domain_->SetNow(delayed_runtime);
lazy_now = time_domain_->CreateLazyNow();
- time_domain_->UpdateWorkQueues(&lazy_now);
+ time_domain_->WakeupReadyDelayedQueues(&lazy_now);
ASSERT_FALSE(time_domain_->NextScheduledRunTime(&next_run_time));
}
@@ -252,7 +252,7 @@ class TimeDomainWithObserverTest : public TimeDomainTest {
TEST_F(TimeDomainWithObserverTest, OnTimeDomainHasImmediateWork) {
EXPECT_CALL(*observer_, OnTimeDomainHasImmediateWork(task_queue_.get()));
- time_domain_->OnQueueHasIncomingImmediateWork(task_queue_.get());
+ time_domain_->OnQueueHasImmediateWork(task_queue_.get());
}
TEST_F(TimeDomainWithObserverTest, OnTimeDomainHasDelayedWork) {
« no previous file with comments | « third_party/WebKit/Source/platform/scheduler/base/time_domain.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698