chromium/base/task/sequence_manager/work_queue_unittest.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/task/sequence_manager/work_queue.h"

#include <stddef.h>

#include <memory>
#include <optional>

#include "base/functional/bind.h"
#include "base/task/common/lazy_now.h"
#include "base/task/sequence_manager/enqueue_order.h"
#include "base/task/sequence_manager/fence.h"
#include "base/task/sequence_manager/sequence_manager.h"
#include "base/task/sequence_manager/task_order.h"
#include "base/task/sequence_manager/task_queue_impl.h"
#include "base/task/sequence_manager/work_queue_sets.h"
#include "base/time/time.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace base {
namespace sequence_manager {
namespace internal {

namespace {

class MockObserver : public WorkQueueSets::Observer {};

void NopTask() {}

struct Cancelable {};

}  // namespace

class WorkQueueTest : public testing::Test {};

class DelayedWorkQueueTest : public WorkQueueTest {};

TEST_F(WorkQueueTest, Empty) {}

TEST_F(WorkQueueTest, Empty_IgnoresFences) {}

TEST_F(WorkQueueTest, GetFrontTaskOrderQueueEmpty) {}

TEST_F(WorkQueueTest, GetFrontTaskOrder) {}

TEST_F(WorkQueueTest, GetFrontTaskQueueEmpty) {}

TEST_F(WorkQueueTest, GetFrontTask) {}

TEST_F(WorkQueueTest, GetBackTask_Empty) {}

TEST_F(WorkQueueTest, GetBackTask) {}

TEST_F(WorkQueueTest, Push) {}

TEST_F(WorkQueueTest, PushMultiple) {}

TEST_F(WorkQueueTest, PushAfterFenceHit) {}

TEST_F(WorkQueueTest, CreateTaskPusherNothingPushed) {}

TEST_F(WorkQueueTest, CreateTaskPusherOneTask) {}

TEST_F(WorkQueueTest, CreateTaskPusherThreeTasks) {}

TEST_F(WorkQueueTest, CreateTaskPusherAfterFenceHit) {}

TEST_F(WorkQueueTest, PushNonNestableTaskToFront) {}

TEST_F(WorkQueueTest, PushNonNestableTaskToFrontAfterFenceHit) {}

TEST_F(WorkQueueTest, PushNonNestableTaskToFrontBeforeFenceHit) {}

TEST_F(WorkQueueTest, TakeImmediateIncomingQueueTasks) {}

TEST_F(WorkQueueTest, TakeImmediateIncomingQueueTasksAfterFenceHit) {}

TEST_F(WorkQueueTest, TakeTaskFromWorkQueue) {}

TEST_F(WorkQueueTest, TakeTaskFromWorkQueue_HitFence) {}

TEST_F(WorkQueueTest, InsertFenceBeforeEnqueueing) {}

TEST_F(WorkQueueTest, InsertFenceAfterEnqueueingNonBlocking) {}

TEST_F(WorkQueueTest, InsertFenceAfterEnqueueing) {}

TEST_F(WorkQueueTest, InsertNewFence) {}

TEST_F(WorkQueueTest, PushWithNonEmptyQueueDoesNotHitFence) {}

TEST_F(WorkQueueTest, RemoveFence) {}

TEST_F(WorkQueueTest, RemoveFenceButNoFence) {}

TEST_F(WorkQueueTest, RemoveFenceNothingUnblocked) {}

TEST_F(WorkQueueTest, BlockedByFence) {}

TEST_F(WorkQueueTest, BlockedByFencePopBecomesEmpty) {}

TEST_F(WorkQueueTest, BlockedByFencePop) {}

TEST_F(WorkQueueTest, InitiallyEmptyBlockedByFenceNewFenceUnblocks) {}

TEST_F(WorkQueueTest, BlockedByFenceNewFenceUnblocks) {}

TEST_F(WorkQueueTest, InsertFenceAfterEnqueuing) {}

TEST_F(WorkQueueTest, RemoveAllCanceledTasksFromFront) {}

TEST_F(WorkQueueTest, RemoveAllCanceledTasksFromFrontTasksNotCanceled) {}

TEST_F(WorkQueueTest, RemoveAllCanceledTasksFromFrontQueueBlockedByFence) {}

TEST_F(WorkQueueTest, CollectTasksOlderThan) {}

TEST_F(DelayedWorkQueueTest, PushMultipleWithSameEnqueueOrder) {}

TEST_F(DelayedWorkQueueTest, DelayedFenceInDelayedTaskGroup) {}

}  // namespace internal
}  // namespace sequence_manager
}  // namespace base