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

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

Issue 2437003002: [scheduler] Add type to scheduler::TaskQueue (Closed)
Patch Set: fix windows compilation 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: 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 a5c833de9cf660a8a389661effb12bf12858cd93..4b0f2ffef08f9537283a4226301223e0318fb5d7 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
@@ -63,9 +63,10 @@ class TimeDomainTest : public testing::Test {
public:
void SetUp() final {
time_domain_ = base::WrapUnique(CreateMockTimeDomain());
- task_queue_ = make_scoped_refptr(new internal::TaskQueueImpl(
- nullptr, time_domain_.get(), TaskQueue::Spec("test_queue"),
- "test.category", "test.category"));
+ task_queue_ = make_scoped_refptr(
+ new internal::TaskQueueImpl(nullptr, time_domain_.get(),
+ TaskQueue::Spec(TaskQueue::QueueType::TEST),
+ "test.category", "test.category"));
}
void TearDown() final {
@@ -122,20 +123,20 @@ TEST_F(TimeDomainTest, ScheduleDelayedWorkSupersedesPreviousWakeup) {
}
TEST_F(TimeDomainTest, RequestWakeup_OnlyCalledForEarlierTasks) {
- scoped_refptr<internal::TaskQueueImpl> task_queue2 =
- make_scoped_refptr(new internal::TaskQueueImpl(
- nullptr, time_domain_.get(), TaskQueue::Spec("test_queue2"),
- "test.category", "test.category"));
+ scoped_refptr<internal::TaskQueueImpl> task_queue2 = make_scoped_refptr(
+ new internal::TaskQueueImpl(nullptr, time_domain_.get(),
+ TaskQueue::Spec(TaskQueue::QueueType::TEST),
+ "test.category", "test.category"));
- scoped_refptr<internal::TaskQueueImpl> task_queue3 =
- make_scoped_refptr(new internal::TaskQueueImpl(
- nullptr, time_domain_.get(), TaskQueue::Spec("test_queue3"),
- "test.category", "test.category"));
+ scoped_refptr<internal::TaskQueueImpl> task_queue3 = make_scoped_refptr(
+ new internal::TaskQueueImpl(nullptr, time_domain_.get(),
+ TaskQueue::Spec(TaskQueue::QueueType::TEST),
+ "test.category", "test.category"));
- scoped_refptr<internal::TaskQueueImpl> task_queue4 =
- make_scoped_refptr(new internal::TaskQueueImpl(
- nullptr, time_domain_.get(), TaskQueue::Spec("test_queue4"),
- "test.category", "test.category"));
+ scoped_refptr<internal::TaskQueueImpl> task_queue4 = make_scoped_refptr(
+ new internal::TaskQueueImpl(nullptr, time_domain_.get(),
+ TaskQueue::Spec(TaskQueue::QueueType::TEST),
+ "test.category", "test.category"));
base::TimeDelta delay1 = base::TimeDelta::FromMilliseconds(10);
base::TimeDelta delay2 = base::TimeDelta::FromMilliseconds(20);
@@ -161,10 +162,10 @@ TEST_F(TimeDomainTest, RequestWakeup_OnlyCalledForEarlierTasks) {
}
TEST_F(TimeDomainTest, UnregisterQueue) {
- scoped_refptr<internal::TaskQueueImpl> task_queue2_ =
- make_scoped_refptr(new internal::TaskQueueImpl(
- nullptr, time_domain_.get(), TaskQueue::Spec("test_queue2"),
- "test.category", "test.category"));
+ scoped_refptr<internal::TaskQueueImpl> task_queue2_ = make_scoped_refptr(
+ new internal::TaskQueueImpl(nullptr, time_domain_.get(),
+ TaskQueue::Spec(TaskQueue::QueueType::TEST),
+ "test.category", "test.category"));
EXPECT_CALL(*time_domain_.get(), RequestWakeup(_, _)).Times(1);
base::TimeTicks now = time_domain_->Now();

Powered by Google App Engine
This is Rietveld 408576698