#include "third_party/blink/renderer/core/scheduler/scripted_idle_task_controller.h"
#include "base/task/single_thread_task_runner.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/frame/lifecycle.mojom-blink.h"
#include "third_party/blink/public/platform/scheduler/web_agent_group_scheduler.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_idle_request_callback.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_idle_request_options.h"
#include "third_party/blink/renderer/core/testing/null_execution_context.h"
#include "third_party/blink/renderer/platform/scheduler/public/dummy_schedulers.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/page_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/thread_scheduler.h"
#include "third_party/blink/renderer/platform/scheduler/public/web_scheduling_task_queue.h"
#include "third_party/blink/renderer/platform/scheduler/test/fake_task_runner.h"
#include "third_party/blink/renderer/platform/testing/scoped_scheduler_overrider.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
namespace blink {
namespace {
ShouldYield;
class DelayedTaskHandleDelegateFacade
: public base::DelayedTaskHandle::Delegate { … };
class TestTaskRunner : public scheduler::FakeTaskRunner { … };
class MockScriptedIdleTaskControllerScheduler final : public ThreadScheduler { … };
class IdleTaskControllerFrameScheduler : public FrameScheduler { … };
class MockIdleTask : public IdleTask { … };
}
TEST(ScriptedIdleTaskControllerTest, RunCallback) { … }
TEST(ScriptedIdleTaskControllerTest, DontRunCallbackWhenAskedToYield) { … }
TEST(ScriptedIdleTaskControllerTest, RunCallbacksAsyncWhenUnpaused) { … }
TEST(ScriptedIdleTaskControllerTest, LongTimeoutShouldBeRemoveFromQueue) { … }
TEST(ScriptedIdleTaskControllerTest, RunAfterSchedulerWasDeleted) { … }
}