#include "base/test/test_mock_time_task_runner.h"
#include <optional>
#include <utility>
#include "base/check_op.h"
#include "base/containers/circular_deque.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted.h"
#include "base/task/single_thread_task_runner.h"
namespace base {
class TestMockTimeTaskRunner::NonOwningProxyTaskRunner
: public SingleThreadTaskRunner { … };
struct TestMockTimeTaskRunner::TestOrderedPendingTask
: public base::TestPendingTask { … };
TestMockTimeTaskRunner::TestOrderedPendingTask::TestOrderedPendingTask()
: … { … }
TestMockTimeTaskRunner::TestOrderedPendingTask::TestOrderedPendingTask(
TestOrderedPendingTask&&) = default;
TestMockTimeTaskRunner::TestOrderedPendingTask::TestOrderedPendingTask(
const Location& location,
OnceClosure task,
TimeTicks post_time,
TimeDelta delay,
size_t ordinal,
TestNestability nestability)
: … { … }
TestMockTimeTaskRunner::TestOrderedPendingTask::~TestOrderedPendingTask() =
default;
TestMockTimeTaskRunner::TestOrderedPendingTask&
TestMockTimeTaskRunner::TestOrderedPendingTask::operator=(
TestOrderedPendingTask&&) = default;
TestMockTimeTaskRunner::ScopedContext::ScopedContext(
scoped_refptr<TestMockTimeTaskRunner> scope)
: … { … }
TestMockTimeTaskRunner::ScopedContext::~ScopedContext() = default;
bool TestMockTimeTaskRunner::TemporalOrder::operator()(
const TestOrderedPendingTask& first_task,
const TestOrderedPendingTask& second_task) const { … }
TestMockTimeTaskRunner::TestMockTimeTaskRunner(Type type)
: … { … }
TestMockTimeTaskRunner::TestMockTimeTaskRunner(Time start_time,
TimeTicks start_ticks,
Type type)
: … { … }
TestMockTimeTaskRunner::~TestMockTimeTaskRunner() { … }
void TestMockTimeTaskRunner::FastForwardBy(TimeDelta delta) { … }
void TestMockTimeTaskRunner::AdvanceMockTickClock(TimeDelta delta) { … }
void TestMockTimeTaskRunner::AdvanceWallClock(TimeDelta delta) { … }
void TestMockTimeTaskRunner::RunUntilIdle() { … }
void TestMockTimeTaskRunner::ProcessNextNTasks(int n) { … }
void TestMockTimeTaskRunner::FastForwardUntilNoTasksRemain() { … }
void TestMockTimeTaskRunner::ClearPendingTasks() { … }
Time TestMockTimeTaskRunner::Now() const { … }
TimeTicks TestMockTimeTaskRunner::NowTicks() const { … }
Clock* TestMockTimeTaskRunner::GetMockClock() const { … }
const TickClock* TestMockTimeTaskRunner::GetMockTickClock() const { … }
base::circular_deque<TestPendingTask>
TestMockTimeTaskRunner::TakePendingTasks() { … }
bool TestMockTimeTaskRunner::HasPendingTask() { … }
size_t TestMockTimeTaskRunner::GetPendingTaskCount() { … }
TimeDelta TestMockTimeTaskRunner::NextPendingTaskDelay() { … }
void TestMockTimeTaskRunner::DetachFromThread() { … }
bool TestMockTimeTaskRunner::RunsTasksInCurrentSequence() const { … }
bool TestMockTimeTaskRunner::PostDelayedTask(const Location& from_here,
OnceClosure task,
TimeDelta delay) { … }
bool TestMockTimeTaskRunner::PostDelayedTaskAt(
subtle::PostDelayedTaskPassKey,
const Location& from_here,
OnceClosure task,
TimeTicks delayed_run_time,
subtle::DelayPolicy deadline_policy) { … }
bool TestMockTimeTaskRunner::PostNonNestableDelayedTask(
const Location& from_here,
OnceClosure task,
TimeDelta delay) { … }
void TestMockTimeTaskRunner::OnBeforeSelectingTask() { … }
void TestMockTimeTaskRunner::OnAfterTimePassed() { … }
void TestMockTimeTaskRunner::OnAfterTaskRun() { … }
void TestMockTimeTaskRunner::ProcessTasksNoLaterThan(TimeDelta max_delta,
int limit) { … }
void TestMockTimeTaskRunner::ForwardClocksUntilTickTime(TimeTicks later_ticks) { … }
bool TestMockTimeTaskRunner::DequeueNextTask(const TimeTicks& reference,
const TimeDelta& max_delta,
TestPendingTask* next_task) { … }
void TestMockTimeTaskRunner::Run(bool application_tasks_allowed,
TimeDelta timeout) { … }
void TestMockTimeTaskRunner::Quit() { … }
void TestMockTimeTaskRunner::EnsureWorkScheduled() { … }
TimeTicks TestMockTimeTaskRunner::MockClock::NowTicks() const { … }
Time TestMockTimeTaskRunner::MockClock::Now() const { … }
}