#include "base/task/sequence_manager/sequence_manager_impl.h"
#include <stddef.h>
#include <memory>
#include <string>
#include <string_view>
#include <tuple>
#include <utility>
#include <vector>
#include "base/auto_reset.h"
#include "base/cancelable_callback.h"
#include "base/debug/stack_trace.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/ref_counted_memory.h"
#include "base/memory/scoped_refptr.h"
#include "base/message_loop/message_pump_default.h"
#include "base/message_loop/message_pump_type.h"
#include "base/rand_util.h"
#include "base/run_loop.h"
#include "base/sequence_checker_impl.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/current_thread.h"
#include "base/task/sequence_manager/sequence_manager.h"
#include "base/task/sequence_manager/task_queue.h"
#include "base/task/sequence_manager/task_queue_impl.h"
#include "base/task/sequence_manager/task_queue_selector.h"
#include "base/task/sequence_manager/tasks.h"
#include "base/task/sequence_manager/test/mock_time_domain.h"
#include "base/task/sequence_manager/test/mock_time_message_pump.h"
#include "base/task/sequence_manager/test/sequence_manager_for_test.h"
#include "base/task/sequence_manager/test/test_task_time_observer.h"
#include "base/task/sequence_manager/thread_controller_with_message_pump_impl.h"
#include "base/task/sequence_manager/work_queue.h"
#include "base/task/sequence_manager/work_queue_sets.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/task_features.h"
#include "base/task/thread_pool.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "base/test/bind.h"
#include "base/test/mock_callback.h"
#include "base/test/null_task_runner.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_tick_clock.h"
#include "base/test/task_environment.h"
#include "base/test/test_mock_time_task_runner.h"
#include "base/test/test_simple_task_runner.h"
#include "base/test/test_timeouts.h"
#include "base/threading/platform_thread.h"
#include "base/threading/sequence_local_storage_slot.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "base/trace_event/base_tracing.h"
#include "base/tracing_buildflags.h"
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#if BUILDFLAG(ENABLE_BASE_TRACING)
#include <optional>
#include "base/test/trace_event_analyzer.h"
#endif
EnqueueOrder;
_;
AnyNumber;
Contains;
ElementsAre;
ElementsAreArray;
HasSubstr;
Mock;
Not;
Return;
StrictMock;
UnorderedElementsAre;
namespace base {
namespace sequence_manager {
namespace internal {
namespace {
enum class RunnerType { … };
enum class WakeUpType { … };
enum class MetricsSampling { … };
enum class TestQueuePriority : TaskQueue::QueuePriority { … };
std::string ToString(RunnerType type) { … }
std::string ToString(WakeUpType type) { … }
std::string ToString(MetricsSampling sampling) { … }
std::string GetTestNameSuffix(
const testing::TestParamInfo<
std::tuple<RunnerType, WakeUpType, MetricsSampling>>& info) { … }
TaskQueueImpl* GetTaskQueueImpl(TaskQueue* task_queue) { … }
constexpr TimeDelta kLeeway = …;
MockTask;
class Fixture { … };
class CallCountingTickClock : public TickClock { … };
class FixtureWithMockTaskRunner final : public Fixture { … };
class FixtureWithMockMessagePump : public Fixture { … };
class SequenceManagerTest
: public testing::TestWithParam<
std::tuple<RunnerType, WakeUpType, MetricsSampling>>,
public Fixture { … };
auto GetTestTypes() { … }
INSTANTIATE_TEST_SUITE_P(…);
void PostFromNestedRunloop(scoped_refptr<SingleThreadTaskRunner> runner,
std::vector<std::pair<OnceClosure, bool>>* tasks) { … }
void NopTask() { … }
class TestCountUsesTimeSource : public TickClock { … };
class QueueTimeTaskObserver : public TaskObserver { … };
}
TEST_P(SequenceManagerTest, GetCorrectTaskRunnerForCurrentTask) { … }
TEST_P(SequenceManagerTest, NowNotCalledIfUnneeded) { … }
TEST_P(SequenceManagerTest,
NowCalledMinimumNumberOfTimesToComputeTaskDurations) { … }
TEST_P(SequenceManagerTest,
NowCalledMinimumNumberOfTimesToComputeTaskDurationsDelayedFenceAllowed) { … }
void NullTask() { … }
void TestTask(uint64_t value, std::vector<EnqueueOrder>* out_result) { … }
void DisableQueueTestTask(uint64_t value,
std::vector<EnqueueOrder>* out_result,
TaskQueue::QueueEnabledVoter* voter) { … }
TEST_P(SequenceManagerTest, SingleQueuePosting) { … }
TEST_P(SequenceManagerTest, MultiQueuePosting) { … }
TEST_P(SequenceManagerTest, NonNestableTaskPosting) { … }
TEST_P(SequenceManagerTest, NonNestableTaskExecutesInExpectedOrder) { … }
TEST_P(SequenceManagerTest, NonNestableTasksDoesntExecuteInNestedLoop) { … }
TEST_P(SequenceManagerTest, NonNestableTasksShutdownQueue) { … }
TEST_P(SequenceManagerTest, NonNestableTaskQueueTimeShiftsToEndOfNestedLoop) { … }
namespace {
void InsertFenceAndPostTestTask(int id,
std::vector<EnqueueOrder>* run_order,
TaskQueue* task_queue,
SequenceManagerForTest* manager) { … }
}
TEST_P(SequenceManagerTest, TaskQueueDisabledFromNestedLoop) { … }
TEST_P(SequenceManagerTest,
HasTaskToRunImmediatelyOrReadyDelayedTask_ImmediateTask) { … }
TEST_P(SequenceManagerTest,
HasTaskToRunImmediatelyOrReadyDelayedTask_DelayedTask) { … }
TEST_P(SequenceManagerTest, DelayedTaskPosting) { … }
TEST_P(SequenceManagerTest, DelayedTaskAtPosting) { … }
TEST_P(SequenceManagerTest, DelayedTaskAtPosting_FlexiblePreferEarly) { … }
TEST_P(SequenceManagerTest, DelayedTaskAtPosting_MixedDelayPolicy) { … }
TEST_P(SequenceManagerTest, DelayedTaskAtPosting_Immediate) { … }
TEST(SequenceManagerTestWithMockTaskRunner,
DelayedTaskExecutedInOneMessageLoopTask) { … }
TEST_P(SequenceManagerTest, DelayedTaskPosting_MultipleTasks_DecendingOrder) { … }
TEST_P(SequenceManagerTest,
DelayedTaskAtPosting_MultipleTasks_DescendingOrder) { … }
TEST_P(SequenceManagerTest, DelayedTaskPosting_MultipleTasks_AscendingOrder) { … }
TEST_P(SequenceManagerTest, DelayedTaskAtPosting_MultipleTasks_AscendingOrder) { … }
TEST(SequenceManagerTestWithMockTaskRunner,
PostDelayedTask_SharesUnderlyingDelayedTasks) { … }
TEST(SequenceManagerTestWithMockTaskRunner,
CrossThreadTaskPostingToDisabledQueueDoesntScheduleWork) { … }
TEST(SequenceManagerTestWithMockTaskRunner,
CrossThreadTaskPostingToBlockedQueueDoesntScheduleWork) { … }
namespace {
class TestObject { … };
int TestObject::destructor_count__ = …;
}
TEST_P(SequenceManagerTest, PendingDelayedTasksRemovedOnShutdown) { … }
TEST_P(SequenceManagerTest, InsertAndRemoveFence) { … }
TEST_P(SequenceManagerTest, RemovingFenceForDisabledQueueDoesNotPostDoWork) { … }
TEST_P(SequenceManagerTest, EnablingFencedQueueDoesNotPostDoWork) { … }
TEST_P(SequenceManagerTest, DenyRunning_BeforePosting) { … }
TEST_P(SequenceManagerTest, DenyRunning_AfterPosting) { … }
TEST_P(SequenceManagerTest, DenyRunning_AfterRemovingFence) { … }
TEST_P(SequenceManagerTest, RemovingFenceWithDelayedTask) { … }
TEST_P(SequenceManagerTest, RemovingFenceWithMultipleDelayedTasks) { … }
TEST_P(SequenceManagerTest, InsertFencePreventsDelayedTasksFromRunning) { … }
TEST_P(SequenceManagerTest, MultipleFences) { … }
TEST_P(SequenceManagerTest, InsertFenceThenImmediatlyRemoveDoesNotBlock) { … }
TEST_P(SequenceManagerTest, InsertFencePostThenRemoveDoesNotBlock) { … }
TEST_P(SequenceManagerTest, MultipleFencesWithInitiallyEmptyQueue) { … }
TEST_P(SequenceManagerTest, BlockedByFence) { … }
TEST_P(SequenceManagerTest, BlockedByFence_BothTypesOfFence) { … }
namespace {
void RecordTimeTask(std::vector<TimeTicks>* run_times, const TickClock* clock) { … }
void RecordTimeAndQueueTask(
std::vector<std::pair<TaskQueue*, TimeTicks>>* run_times,
TaskQueue* task_queue,
const TickClock* clock) { … }
}
TEST_P(SequenceManagerTest, DelayedFence_DelayedTasks) { … }
TEST_P(SequenceManagerTest, DelayedFence_ImmediateTasks) { … }
TEST_P(SequenceManagerTest, DelayedFence_RemovedFenceDoesNotActivate) { … }
TEST_P(SequenceManagerTest, DelayedFence_TakeIncomingImmediateQueue) { … }
namespace {
void ReentrantTestTask(TaskQueue* runner,
int countdown,
std::vector<EnqueueOrder>* out_result) { … }
}
TEST_P(SequenceManagerTest, ReentrantPosting) { … }
namespace {
class RefCountedCallbackFactory { … };
}
TEST_P(SequenceManagerTest, NoTasksAfterShutdown) { … }
void PostTaskToRunner(TaskQueue* runner, std::vector<EnqueueOrder>* run_order) { … }
TEST_P(SequenceManagerTest, PostFromThread) { … }
void RePostingTestTask(TaskQueue* runner, int* run_count) { … }
TEST_P(SequenceManagerTest, DoWorkCantPostItselfMultipleTimes) { … }
TEST_P(SequenceManagerTest, PostFromNestedRunloop) { … }
TEST_P(SequenceManagerTest, WorkBatching) { … }
namespace {
class MockTaskObserver : public TaskObserver { … };
}
TEST_P(SequenceManagerTest, TaskObserverAdding) { … }
TEST_P(SequenceManagerTest, TaskObserverRemoving) { … }
void RemoveObserverTask(SequenceManagerImpl* manager, TaskObserver* observer) { … }
TEST_P(SequenceManagerTest, TaskObserverRemovingInsideTask) { … }
TEST_P(SequenceManagerTest, QueueTaskObserverAdding) { … }
TEST_P(SequenceManagerTest, QueueTaskObserverRemoving) { … }
void RemoveQueueObserverTask(TaskQueue* queue, TaskObserver* observer) { … }
TEST_P(SequenceManagerTest, QueueTaskObserverRemovingInsideTask) { … }
TEST_P(SequenceManagerTest, CancelHandleInsideTaskObserver) { … }
TEST_P(SequenceManagerTest, ThreadCheckAfterTermination) { … }
TEST_P(SequenceManagerTest, GetNextDelayedWakeUp) { … }
TEST_P(SequenceManagerTest, GetNextDelayedWakeUp_MultipleQueues) { … }
TEST(SequenceManagerWithTaskRunnerTest, DeleteSequenceManagerInsideATask) { … }
TEST_P(SequenceManagerTest, GetAndClearSystemIsQuiescentBit) { … }
TEST_P(SequenceManagerTest, HasTaskToRunImmediatelyOrReadyDelayedTask) { … }
TEST_P(SequenceManagerTest,
HasTaskToRunImmediatelyOrReadyDelayedTask_DelayedTasks) { … }
TEST_P(SequenceManagerTest, ImmediateTasksAreNotStarvedByDelayedTasks) { … }
TEST_P(SequenceManagerTest,
DelayedTaskDoesNotSkipAHeadOfNonDelayedTask_SameQueue) { … }
TEST_P(SequenceManagerTest,
DelayedTaskDoesNotSkipAHeadOfNonDelayedTask_DifferentQueues) { … }
TEST_P(SequenceManagerTest, DelayedTaskDoesNotSkipAHeadOfShorterDelayedTask) { … }
namespace {
void CheckIsNested(bool* is_nested) { … }
void PostAndQuitFromNestedRunloop(RunLoop* run_loop,
TaskQueue* runner,
bool* was_nested) { … }
}
TEST_P(SequenceManagerTest, QuitWhileNested) { … }
namespace {
class SequenceNumberCapturingTaskObserver : public TaskObserver { … };
}
TEST_P(SequenceManagerTest, SequenceNumSetWhenTaskIsPosted) { … }
TEST_P(SequenceManagerTest, NewTaskQueues) { … }
TEST_P(SequenceManagerTest, ShutdownTaskQueue_TaskRunnersDetaching) { … }
TEST_P(SequenceManagerTest, ShutdownTaskQueue) { … }
TEST_P(SequenceManagerTest, ShutdownTaskQueue_WithDelayedTasks) { … }
namespace {
void ShutdownQueue(TaskQueue::Handle queue) { … }
}
TEST_P(SequenceManagerTest, ShutdownTaskQueue_InTasks) { … }
namespace {
class MockObserver : public SequenceManager::Observer { … };
}
TEST_P(SequenceManagerTest, ShutdownTaskQueueInNestedLoop) { … }
TEST_P(SequenceManagerTest, TimeDomainMigrationWithIncomingImmediateTasks) { … }
TEST_P(SequenceManagerTest, TimeDomainDoesNotCauseWakeUp) { … }
TEST_P(SequenceManagerTest,
PostDelayedTasksReverseOrderAlternatingTimeDomains) { … }
namespace {
class MockTaskQueueThrottler : public TaskQueue::Throttler { … };
}
TEST_P(SequenceManagerTest, TaskQueueThrottler_ImmediateTask) { … }
TEST_P(SequenceManagerTest, TaskQueueThrottler_DelayedTask) { … }
TEST_P(SequenceManagerTest, TaskQueueThrottler_OnWakeUp) { … }
TEST_P(SequenceManagerTest, TaskQueueThrottler_ResetThrottler) { … }
TEST_P(SequenceManagerTest, TaskQueueThrottler_DelayedTaskMultipleQueues) { … }
TEST_P(SequenceManagerTest, TaskQueueThrottler_DelayedWorkWhichCanRunNow) { … }
namespace {
class CancelableTask { … };
class DestructionCallback { … };
}
TEST_P(SequenceManagerTest, TaskQueueThrottler_SweepCanceledDelayedTasks) { … }
TEST_P(SequenceManagerTest, SweepLastTaskInQueue) { … }
TEST_P(SequenceManagerTest, CancelledTaskPostAnother_ReclaimMemory) { … }
TEST_P(SequenceManagerTest,
CancelledTaskPostAnother_MoveReadyDelayedTasksToWorkQueues) { … }
TEST_P(SequenceManagerTest,
CancelledTaskPostAnother_RemoveAllCanceledDelayedTasksFromFront) { … }
TEST_P(SequenceManagerTest, CancelledImmediateTaskShutsDownQueue) { … }
TEST_P(SequenceManagerTest, CancelledDelayedTaskShutsDownQueue) { … }
namespace {
void ChromiumRunloopInspectionTask(
scoped_refptr<TestMockTimeTaskRunner> test_task_runner) { … }
}
TEST(SequenceManagerTestWithMockTaskRunner,
NumberOfPendingTasksOnChromiumRunLoop) { … }
namespace {
class QuadraticTask { … };
class LinearTask { … };
bool ShouldExit(QuadraticTask* quadratic_task, LinearTask* linear_task) { … }
}
TEST_P(SequenceManagerTest,
DelayedTasksDontBadlyStarveNonDelayedWork_SameQueue) { … }
TEST_P(SequenceManagerTest, ImmediateWorkCanStarveDelayedTasks_SameQueue) { … }
TEST_P(SequenceManagerTest,
DelayedTasksDontBadlyStarveNonDelayedWork_DifferentQueue) { … }
TEST_P(SequenceManagerTest, ImmediateWorkCanStarveDelayedTasks_DifferentQueue) { … }
TEST_P(SequenceManagerTest, CurrentlyExecutingTaskQueue_NoTaskRunning) { … }
namespace {
void CurrentlyExecutingTaskQueueTestTask(
SequenceManagerImpl* sequence_manager,
std::vector<internal::TaskQueueImpl*>* task_sources) { … }
}
TEST_P(SequenceManagerTest, CurrentlyExecutingTaskQueue_TaskRunning) { … }
namespace {
void RunloopCurrentlyExecutingTaskQueueTestTask(
SequenceManagerImpl* sequence_manager,
std::vector<internal::TaskQueueImpl*>* task_sources,
std::vector<std::pair<OnceClosure, TaskQueue*>>* tasks) { … }
}
TEST_P(SequenceManagerTest, CurrentlyExecutingTaskQueue_NestedLoop) { … }
TEST_P(SequenceManagerTest, NoWakeUpsForCanceledDelayedTasks) { … }
TEST_P(SequenceManagerTest, NoWakeUpsForCanceledDelayedTasksReversePostOrder) { … }
TEST_P(SequenceManagerTest, TimeDomainWakeUpOnlyCancelledIfAllUsesCancelled) { … }
TEST_P(SequenceManagerTest, SweepCanceledDelayedTasks) { … }
TEST_P(SequenceManagerTest, SweepCanceledDelayedTasks_ManyTasks) { … }
TEST_P(SequenceManagerTest, DelayedTasksNotSelected) { … }
TEST_P(SequenceManagerTest, DelayedTasksNotSelectedWithImmediateTask) { … }
TEST_P(SequenceManagerTest,
DelayedTasksNotSelectedWithImmediateTaskWithPriority) { … }
TEST_P(SequenceManagerTest, GetPendingWakeUp) { … }
TEST_P(SequenceManagerTest, GetPendingWakeUp_Disabled) { … }
TEST_P(SequenceManagerTest, GetPendingWakeUp_Fence) { … }
TEST_P(SequenceManagerTest, GetPendingWakeUp_FenceUnblocking) { … }
TEST_P(SequenceManagerTest, GetPendingWakeUp_DelayedTaskReady) { … }
TEST_P(SequenceManagerTest, RemoveAllCanceledDelayedTasksFromFront) { … }
TEST_P(SequenceManagerTest,
RemoveAllCanceledDelayedTasksFromFront_MultipleQueues) { … }
namespace {
void MessageLoopTaskWithDelayedQuit(Fixture* fixture, TaskQueue* task_queue) { … }
}
TEST_P(SequenceManagerTest, DelayedTaskRunsInNestedMessageLoop) { … }
namespace {
void MessageLoopTaskWithImmediateQuit(OnceClosure non_nested_quit_closure,
TaskQueue* task_queue) { … }
}
TEST_P(SequenceManagerTest, DelayedNestedMessageLoopDoesntPreventTasksRunning) { … }
TEST_P(SequenceManagerTest, CouldTaskRun_DisableAndReenable) { … }
TEST_P(SequenceManagerTest, CouldTaskRun_Fence) { … }
TEST_P(SequenceManagerTest, CouldTaskRun_FenceBeforeThenAfter) { … }
TEST_P(SequenceManagerTest, DelayedDoWorkNotPostedForDisabledQueue) { … }
TEST_P(SequenceManagerTest, DisablingQueuesChangesDelayTillNextDoWork) { … }
TEST_P(SequenceManagerTest, GetNextDesiredWakeUp) { … }
TEST_P(SequenceManagerTest, SetTimeDomainForDisabledQueue) { … }
namespace {
void SetOnTaskHandlers(TaskQueue* task_queue,
int* start_counter,
int* complete_counter) { … }
void UnsetOnTaskHandlers(TaskQueue* task_queue) { … }
}
TEST_P(SequenceManagerTest, ProcessTasksWithoutTaskTimeObservers) { … }
TEST_P(SequenceManagerTest, ProcessTasksWithTaskTimeObservers) { … }
TEST_P(SequenceManagerTest, ObserverNotFiredAfterTaskQueueDestructed) { … }
TEST_P(SequenceManagerTest,
OnQueueNextWakeUpChangedNotFiredForDisabledQueuePostTask) { … }
TEST_P(SequenceManagerTest,
OnQueueNextWakeUpChangedNotFiredForCrossThreadDisabledQueuePostTask) { … }
TEST_P(SequenceManagerTest, GracefulShutdown_ManagerDeletedInFlight) { … }
TEST_P(SequenceManagerTest, SequenceManagerDeletedWithQueuesToDelete) { … }
TEST(SequenceManagerBasicTest, DefaultTaskRunnerSupport) { … }
TEST_P(SequenceManagerTest, CanceledTasksInQueueCantMakeOtherTasksSkipAhead) { … }
TEST_P(SequenceManagerTest, TaskQueueDeleted) { … }
namespace {
class RunOnDestructionHelper { … };
base::OnceClosure RunOnDestruction(base::OnceClosure task) { … }
base::OnceClosure PostOnDestruction(TaskQueue* task_queue,
base::OnceClosure task) { … }
}
TEST_P(SequenceManagerTest, TaskQueueUsedInTaskDestructorAfterShutdown) { … }
TEST_P(SequenceManagerTest, TaskQueueTaskRunnerDetach) { … }
TEST_P(SequenceManagerTest, DestructorPostChainDuringShutdown) { … }
TEST_P(SequenceManagerTest, DestructorPostsViaTaskRunnerHandleDuringShutdown) { … }
TEST_P(SequenceManagerTest, CreateUnboundSequenceManagerWhichIsNeverBound) { … }
TEST_P(SequenceManagerTest, HasPendingHighResolutionTasks) { … }
TEST_P(SequenceManagerTest, HasPendingHighResolutionTasksLowPriority) { … }
TEST_P(SequenceManagerTest,
HasPendingHighResolutionTasksLowAndNormalPriorityQueues) { … }
namespace {
class PostTaskWhenDeleted;
void CallbackWithDestructor(std::unique_ptr<PostTaskWhenDeleted>);
class PostTaskWhenDeleted { … };
void CallbackWithDestructor(std::unique_ptr<PostTaskWhenDeleted> object) { … }
}
TEST_P(SequenceManagerTest, DoesNotRecordQueueTimeIfSettingFalse) { … }
TEST_P(SequenceManagerTest, RecordsQueueTimeIfSettingTrue) { … }
namespace {
class DestructionObserverProbe : public RefCounted<DestructionObserverProbe> { … };
class SMDestructionObserver : public CurrentThread::DestructionObserver { … };
}
TEST_P(SequenceManagerTest, DestructionObserverTest) { … }
TEST_P(SequenceManagerTest, GetMessagePump) { … }
namespace {
class MockTimeDomain : public TimeDomain { … };
}
TEST_P(SequenceManagerTest, OnIdleTimeDomainNotification) { … }
TEST_P(SequenceManagerTest, CreateTaskQueue) { … }
TEST_P(SequenceManagerTest, GetPendingTaskCountForTesting) { … }
TEST_P(SequenceManagerTest, PostDelayedTaskFromOtherThread) { … }
namespace {
void PostTaskA(scoped_refptr<TaskRunner> task_runner) { … }
void PostTaskB(scoped_refptr<TaskRunner> task_runner) { … }
void PostTaskC(scoped_refptr<TaskRunner> task_runner) { … }
}
TEST_P(SequenceManagerTest, DescribeAllPendingTasks) { … }
TEST_P(SequenceManagerTest, TaskPriortyInterleaving) { … }
namespace {
class CancelableTaskWithDestructionObserver { … };
}
TEST_P(SequenceManagerTest, PeriodicHousekeeping) { … }
namespace {
class MockCrashKeyImplementation : public debug::CrashKeyImplementation { … };
}
TEST_P(SequenceManagerTest, CrossQueueTaskPostingWhenQueueDeleted) { … }
TEST_P(SequenceManagerTest, UnregisterTaskQueueTriggersScheduleWork) { … }
TEST_P(SequenceManagerTest, ReclaimMemoryRemovesCorrectQueueFromSet) { … }
namespace {
class TaskObserverExpectingNoDelayedRunTime : public TaskObserver { … };
}
TEST_P(SequenceManagerTest, NoDelayedRunTimeForImmediateTask) { … }
TEST_P(SequenceManagerTest, TaskObserverBlockedOrLowPriority_QueueDisabled) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_FenceBeginningOfTime) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_PostedBeforeFenceNow) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_PostedAfterFenceNow) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_LowerPriorityWhileQueued) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_LowPriorityWhenQueueing) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_LowPriorityWhenRunning) { … }
TEST_P(SequenceManagerTest,
TaskObserverBlockedOrLowPriority_TaskObserverUnblockedWithBacklog) { … }
TEST_P(SequenceManagerTest, TaskObserverBlockedOrLowPriority_Mix) { … }
TEST_P(SequenceManagerTest, DelayedTaskOrderFromMultipleQueues) { … }
TEST_P(SequenceManagerTest, OnTaskPostedCallbacks) { … }
class SequenceManagerRunOrPostTaskTest : public testing::Test { … };
TEST_F(SequenceManagerRunOrPostTaskTest, FromBoundThreadOutsideRunLoop) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromOtherThreadOutsideRunLoop) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromInsideTask) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromOtherThreadWithQueuedTask) { … }
TEST_F(SequenceManagerRunOrPostTaskTest,
FromOtherThreadWithQueuedTaskOtherQueue) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromOtherThreadNoQueuedOrRunningTask) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromOtherThreadInternalWork) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromOtherThreadDisabledQueue) { … }
TEST_F(SequenceManagerRunOrPostTaskTest,
FromOtherThreadQueuedTaskInDisabledOtherQueue) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, FromOtherThreadWithRunningTask) { … }
TEST_F(SequenceManagerRunOrPostTaskTest,
FromOtherThreadWithRunningTaskInNestedLoop) { … }
TEST_F(SequenceManagerRunOrPostTaskTest,
FromOtherThreadWithRunningTaskOtherQueue) { … }
TEST_F(SequenceManagerRunOrPostTaskTest,
MainThreadCantStartTaskDuringRunOrPostTask) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, ConcurrentCalls) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, SequenceAndThreadChecker) { … }
TEST_F(SequenceManagerRunOrPostTaskTest,
SequenceAndThreadCheckerFromThreadPool) { … }
TEST_F(SequenceManagerRunOrPostTaskTest, CurrentDefaultTaskRunner) { … }
TEST(
SequenceManagerTest,
CanAccessSingleThreadTaskRunnerCurrentDefaultHandleHandleDuringSequenceLocalStorageSlotDestruction) { … }
TEST(SequenceManagerTest, BindOnDifferentThreadWithActiveVoters) { … }
}
}
}