#include "third_party/blink/renderer/platform/scheduler/common/auto_advancing_virtual_time_domain.h"
#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/message_loop/message_pump.h"
#include "base/run_loop.h"
#include "base/task/sequence_manager/sequence_manager.h"
#include "base/task/sequence_manager/test/test_task_time_observer.h"
#include "base/time/time.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/scheduler/common/task_priority.h"
#include "third_party/blink/renderer/platform/scheduler/worker/non_main_thread_scheduler_helper.h"
namespace blink {
namespace scheduler {
namespace auto_advancing_virtual_time_domain_unittest {
class AutoAdvancingVirtualTimeDomainTest : public testing::Test { … };
namespace {
void NopTask(bool* task_run) { … }
}
namespace {
void RepostingTask(scoped_refptr<NonMainThreadTaskQueue> task_queue,
int max_count,
int* count) { … }
void DelayedTask(int* count_in, int* count_out) { … }
}
TEST_F(AutoAdvancingVirtualTimeDomainTest,
MaxVirtualTimeTaskStarvationCountOneHundred) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest,
MaxVirtualTimeTaskStarvationCountZero) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest, TaskStarvationCountIncrements) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest, TaskStarvationCountNotIncrements) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest, TaskStarvationCountResets) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest, BaseTimeOverriden) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest, BaseTimeTicksOverriden) { … }
TEST_F(AutoAdvancingVirtualTimeDomainTest, GetNextWakeUpHandlesPastRunTime) { … }
}
}
}