#include "third_party/blink/renderer/platform/scheduler/worker/worker_scheduler_proxy.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/sequence_manager/test/sequence_manager_for_test.h"
#include "base/test/bind.h"
#include "base/test/task_environment.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/main_thread/frame_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/main_thread_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/main_thread/page_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/worker/non_main_thread_impl.h"
#include "third_party/blink/renderer/platform/scheduler/worker/worker_scheduler_impl.h"
#include "third_party/blink/renderer/platform/scheduler/worker/worker_thread_scheduler.h"
namespace blink {
namespace scheduler {
namespace {
class WorkerThreadSchedulerForTest : public WorkerThreadScheduler { … };
class WorkerThreadForTest : public NonMainThreadImpl { … };
std::unique_ptr<WorkerThreadForTest> CreateWorkerThread(
FrameScheduler* frame_scheduler,
base::WaitableEvent* throtting_state_changed) { … }
}
class WorkerSchedulerProxyTest : public testing::Test { … };
TEST_F(WorkerSchedulerProxyTest, VisibilitySignalReceived) { … }
TEST_F(WorkerSchedulerProxyTest, FrameSchedulerDestroyed) { … }
TEST_F(WorkerSchedulerProxyTest, ThreadDestroyed) { … }
}
}