#include "base/sequence_checker.h"
#include <stddef.h>
#include <memory>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/sequence_checker_impl.h"
#include "base/sequence_token.h"
#include "base/synchronization/lock.h"
#include "base/synchronization/lock_subtle.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/gtest_util.h"
#include "base/test/task_environment.h"
#include "base/threading/simple_thread.h"
#include "base/threading/thread_local.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base::internal {
namespace {
class RunCallbackThread : public SimpleThread { … };
void ExpectCalledOnValidSequence(SequenceCheckerImpl* sequence_checker) { … }
void ExpectNotCalledOnValidSequence(SequenceCheckerImpl* sequence_checker) { … }
}
TEST(SequenceCheckerTest, NoTaskScope) { … }
TEST(SequenceCheckerTest, TaskScope) { … }
TEST(SequenceCheckerTest, TaskScopeThreadBound) { … }
TEST(SequenceCheckerTest, DifferentThreadNoTaskScope) { … }
TEST(SequenceCheckerTest, DifferentThreadDifferentSequenceToken) { … }
TEST(SequenceCheckerTest, DifferentThreadDifferentSequenceTokenThreadBound) { … }
TEST(SequenceCheckerTest, DifferentThreadSameSequenceToken) { … }
TEST(SequenceCheckerTest, DifferentThreadSameSequenceTokenThreadBound) { … }
TEST(SequenceCheckerTest, SameThreadDifferentSequenceToken) { … }
TEST(SequenceCheckerTest, DetachFromSequence) { … }
TEST(SequenceCheckerTest, DetachFromSequenceNoSequenceToken) { … }
TEST(SequenceCheckerTest, Move) { … }
TEST(SequenceCheckerTest, MoveAssignIntoDetached) { … }
TEST(SequenceCheckerTest, MoveFromDetachedRebinds) { … }
TEST(SequenceCheckerTest, MoveOffSequenceBanned) { … }
TEST(SequenceCheckerMacroTest, Macros) { … }
class SequenceCheckerOwner { … };
TEST(SequenceCheckerTest, FromThreadDestruction) { … }
#if DCHECK_IS_ON()
TEST(SequenceCheckerTest, LockBasic) { … }
TEST(SequenceCheckerTest, ManyLocks) { … }
TEST(SequenceCheckerTest, LockAndSequence) { … }
TEST(SequenceCheckerTest, LockDetachFromSequence) { … }
TEST(SequenceCheckerTest, LockMoveConstruction) { … }
TEST(SequenceCheckerTest, LockMoveAssignment) { … }
#endif
}