#include "components/unexportable_keys/background_long_task_scheduler.h"
#include "base/cancelable_callback.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/scoped_refptr.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "base/time/time.h"
#include "components/unexportable_keys/background_task_impl.h"
#include "components/unexportable_keys/background_task_priority.h"
#include "components/unexportable_keys/background_task_type.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace unexportable_keys {
namespace {
struct BackgroundThreadData { … };
class FakeTask : public internal::BackgroundTaskImpl<size_t> { … };
std::string ToString(BackgroundTaskPriority priority) { … }
std::string ToString(BackgroundTaskType type) { … }
}
class BackgroundLongTaskSchedulerTest : public testing::Test { … };
TEST_F(BackgroundLongTaskSchedulerTest, PostTask) { … }
TEST_F(BackgroundLongTaskSchedulerTest, PostTwoTasks) { … }
TEST_F(BackgroundLongTaskSchedulerTest, PostTwoTasks_Sequentially) { … }
TEST_F(BackgroundLongTaskSchedulerTest, TaskPriority) { … }
TEST_F(BackgroundLongTaskSchedulerTest, CancelPendingTask) { … }
TEST_F(BackgroundLongTaskSchedulerTest, CancelRunningTask) { … }
TEST_F(BackgroundLongTaskSchedulerTest, DurationHistogram) { … }
TEST_F(BackgroundLongTaskSchedulerTest, DurationHistogramWithCanceledTasks) { … }
TEST_F(BackgroundLongTaskSchedulerTest, QueueWaitAndRunDurationHistograms) { … }
}