#include "content/browser/scheduler/browser_ui_thread_scheduler.h"
#include <memory>
#include <utility>
#include <vector>
#include "base/feature_list.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_features.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "content/public/browser/browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
namespace features {
BASE_FEATURE(…);
}
class BrowserUIThreadSchedulerTest : public testing::Test { … };
namespace {
StrictMockTask;
base::OnceClosure RunOnDestruction(base::OnceClosure task) { … }
base::OnceClosure PostOnDestruction(
scoped_refptr<base::SingleThreadTaskRunner> task_queue,
base::OnceClosure task) { … }
TEST_F(BrowserUIThreadSchedulerTest, DestructorPostChainDuringShutdown) { … }
TEST_F(BrowserUIThreadSchedulerTest,
TaskPostedWithThreadHandleRunBeforeQueuesAreEnabled) { … }
TEST_F(BrowserUIThreadSchedulerTest, TestPostedTasksDeferredDuringScroll) { … }
TEST_F(BrowserUIThreadSchedulerTest, TestPostedTasksNotDeferredWithoutScroll) { … }
TEST_F(BrowserUIThreadSchedulerTest,
TestPostedTasksNotDeferredDuringScrollExperimentDisabled) { … }
}
}