#include "src/base/atomicops.h"
#include "src/base/platform/platform.h"
#include "src/tasks/cancelable-task.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace v8 {
namespace internal {
namespace {
ResultType;
class CancelableTaskManagerTest;
class TestTask : public Task, public Cancelable { … };
class SequentialRunner { … };
class ThreadedRunner final : public base::Thread { … };
class CancelableTaskManagerTest : public ::testing::Test { … };
TestTask::TestTask(CancelableTaskManagerTest* test, ResultType* result,
Mode mode)
: … { … }
void TestTask::Run() { … }
}
TEST_F(CancelableTaskManagerTest, EmptyCancelableTaskManager) { … }
TEST_F(CancelableTaskManagerTest, SequentialCancelAndWait) { … }
TEST_F(CancelableTaskManagerTest, SequentialMultipleTasks) { … }
TEST_F(CancelableTaskManagerTest, ThreadedMultipleTasksStarted) { … }
TEST_F(CancelableTaskManagerTest, ThreadedMultipleTasksNotRun) { … }
TEST_F(CancelableTaskManagerTest, RemoveBeforeCancelAndWait) { … }
TEST_F(CancelableTaskManagerTest, RemoveAfterCancelAndWait) { … }
TEST_F(CancelableTaskManagerTest, RemoveUnmanagedId) { … }
TEST_F(CancelableTaskManagerTest, EmptyTryAbortAll) { … }
TEST_F(CancelableTaskManagerTest, ThreadedMultipleTasksNotRunTryAbortAll) { … }
TEST_F(CancelableTaskManagerTest, ThreadedMultipleTasksStartedTryAbortAll) { … }
}
}