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

Side by Side Diff: base/task_scheduler/delayed_task_manager_unittest.cc

Issue 2077093002: Rename SchedulerWorkerThread* to SchedulerWorker* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename2
Patch Set: Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/task_scheduler/delayed_task_manager.h" 5 #include "base/task_scheduler/delayed_task_manager.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 return nullptr; 53 return nullptr;
54 } 54 }
55 55
56 void ReEnqueueSequence(scoped_refptr<Sequence> sequence, 56 void ReEnqueueSequence(scoped_refptr<Sequence> sequence,
57 const SequenceSortKey& sequence_sort_key) override { 57 const SequenceSortKey& sequence_sort_key) override {
58 NOTREACHED(); 58 NOTREACHED();
59 } 59 }
60 60
61 bool PostTaskWithSequence(std::unique_ptr<Task> task, 61 bool PostTaskWithSequence(std::unique_ptr<Task> task,
62 scoped_refptr<Sequence> sequence, 62 scoped_refptr<Sequence> sequence,
63 SchedulerWorkerThread* worker_thread) override { 63 SchedulerWorker* worker) override {
64 NOTREACHED(); 64 NOTREACHED();
65 return true; 65 return true;
66 } 66 }
67 67
68 void PostTaskWithSequenceNow(std::unique_ptr<Task> task, 68 void PostTaskWithSequenceNow(std::unique_ptr<Task> task,
69 scoped_refptr<Sequence> sequence, 69 scoped_refptr<Sequence> sequence,
70 SchedulerWorkerThread* worker_thread) override { 70 SchedulerWorker* worker) override {
71 PostTaskWithSequenceNowMock(task.get(), sequence.get(), worker_thread); 71 PostTaskWithSequenceNowMock(task.get(), sequence.get(), worker);
72 } 72 }
73 73
74 MOCK_METHOD3(PostTaskWithSequenceNowMock, 74 MOCK_METHOD3(PostTaskWithSequenceNowMock,
75 void(const Task*, 75 void(const Task*,
76 const Sequence*, 76 const Sequence*,
77 const SchedulerWorkerThread* worker_thread)); 77 const SchedulerWorker* worker));
78 }; 78 };
79 79
80 } // namespace 80 } // namespace
81 81
82 // Verify that GetDelayedRunTime() returns a null TimeTicks when there are 82 // Verify that GetDelayedRunTime() returns a null TimeTicks when there are
83 // no pending delayed tasks. 83 // no pending delayed tasks.
84 TEST(TaskSchedulerDelayedTaskManagerTest, 84 TEST(TaskSchedulerDelayedTaskManagerTest,
85 GetDelayedRunTimeNoPendingDelayedTasks) { 85 GetDelayedRunTimeNoPendingDelayedTasks) {
86 TestDelayedTaskManager manager; 86 TestDelayedTaskManager manager;
87 EXPECT_EQ(TimeTicks(), manager.GetDelayedRunTime()); 87 EXPECT_EQ(TimeTicks(), manager.GetDelayedRunTime());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 PostTaskWithSequenceNowMock(task_a_raw, sequence.get(), nullptr)); 236 PostTaskWithSequenceNowMock(task_a_raw, sequence.get(), nullptr));
237 EXPECT_CALL(worker_pool, 237 EXPECT_CALL(worker_pool,
238 PostTaskWithSequenceNowMock(task_b_raw, sequence.get(), nullptr)); 238 PostTaskWithSequenceNowMock(task_b_raw, sequence.get(), nullptr));
239 manager.PostReadyTasks(); 239 manager.PostReadyTasks();
240 testing::Mock::VerifyAndClear(&worker_pool); 240 testing::Mock::VerifyAndClear(&worker_pool);
241 EXPECT_EQ(TimeTicks(), manager.GetDelayedRunTime()); 241 EXPECT_EQ(TimeTicks(), manager.GetDelayedRunTime());
242 } 242 }
243 243
244 } // namespace internal 244 } // namespace internal
245 } // namespace base 245 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698