#include "net/quic/test_task_runner.h"
#include <algorithm>
#include <utility>
#include "base/time/time.h"
#include "net/third_party/quiche/src/quiche/quic/test_tools/mock_clock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net::test {
namespace {
base::TimeTicks NowInTicks(const quic::MockClock& clock) { … }
}
TestTaskRunner::TestTaskRunner(quic::MockClock* clock) : … { … }
TestTaskRunner::~TestTaskRunner() = default;
bool TestTaskRunner::PostDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) { … }
bool TestTaskRunner::PostNonNestableDelayedTask(const base::Location& from_here,
base::OnceClosure task,
base::TimeDelta delay) { … }
bool TestTaskRunner::RunsTasksInCurrentSequence() const { … }
const std::vector<PostedTask>& TestTaskRunner::GetPostedTasks() const { … }
quic::QuicTime::Delta TestTaskRunner::NextPendingTaskDelay() { … }
void TestTaskRunner::RunNextTask() { … }
void TestTaskRunner::FastForwardBy(quic::QuicTime::Delta delta) { … }
void TestTaskRunner::RunUntilIdle() { … }
namespace {
struct ShouldRunBeforeLessThan { … };
}
std::vector<PostedTask>::iterator TestTaskRunner::FindNextTask() { … }
}