#include "components/named_system_lock/lock.h"
#include <memory>
#include <string>
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/task_traits.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "base/unguessable_token.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_LINUX)
#include <fcntl.h>
#include <sys/mman.h>
#include "base/files/file.h"
#include "base/strings/strcat.h"
#elif BUILDFLAG(IS_MAC)
#include "base/strings/strcat.h"
#elif BUILDFLAG(IS_WIN)
#include <windows.h>
#include "base/strings/utf_string_conversions.h"
#include "base/win/atl.h"
#endif
namespace named_system_lock {
class NamedSystemLockTest : public ::testing::Test { … };
TEST_F(NamedSystemLockTest, LockThenLockSameThread) { … }
TEST_F(NamedSystemLockTest, LockThenTryLockInThreadFail) { … }
TEST_F(NamedSystemLockTest, TryLockInThreadSuccess) { … }
#if BUILDFLAG(IS_LINUX)
TEST_F(NamedSystemLockTest, SharedMemoryWrongPermissions) { … }
#endif
}