#include "components/offline_pages/task/task_queue.h"
#include <memory>
#include <utility>
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/task/single_thread_task_runner.h"
#include "base/functional/bind.h"
#include "base/functional/callback_forward.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "components/offline_pages/task/test_task.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace offline_pages {
class SimpleTask : public Task { … };
class SuspendingTask : public SimpleTask { … };
TaskState;
class OfflineTaskQueueTest : public testing::Test, public TaskQueue::Delegate { … };
OfflineTaskQueueTest::OfflineTaskQueueTest()
: … { … }
void OfflineTaskQueueTest::PumpLoop() { … }
void OfflineTaskQueueTest::OnTaskQueueIsIdle() { … }
void OfflineTaskQueueTest::TaskCompleted(Task* task) { … }
TEST_F(OfflineTaskQueueTest, AddAndRunSingleTask) { … }
TEST_F(OfflineTaskQueueTest, AddAndRunMultipleTasks) { … }
TEST_F(OfflineTaskQueueTest, LeaveEarly) { … }
TEST_F(OfflineTaskQueueTest, SuspendAndResume) { … }
TEST_F(OfflineTaskQueueTest, SuspendResumeSuspend) { … }
TEST_F(OfflineTaskQueueTest, SuspendAndResumeNoOtherTasksRunning) { … }
TEST_F(OfflineTaskQueueTest, SuspendAndNeverResume) { … }
TEST_F(OfflineTaskQueueTest, CompleteWhileSuspended) { … }
}