#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <algorithm>
#include <cstring>
#include <memory>
#include <numeric>
#include <utility>
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ref.h"
#include "base/profiler/stack_buffer.h"
#include "base/profiler/stack_copier_suspend.h"
#include "base/profiler/suspendable_thread_delegate.h"
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#if BUILDFLAG(IS_CHROMEOS)
#include "base/memory/page_size.h"
#endif
namespace base {
namespace {
Each;
ElementsAre;
class TestSuspendableThreadDelegate : public SuspendableThreadDelegate { … };
class TestStackCopierDelegate : public StackCopier::Delegate { … };
}
TEST(StackCopierSuspendTest, CopyStack) { … }
TEST(StackCopierSuspendTest, CopyStackBufferTooSmall) { … }
TEST(StackCopierSuspendTest, CopyStackAndRewritePointers) { … }
TEST(StackCopierSuspendTest, CopyStackTimeStamp) { … }
TEST(StackCopierSuspendTest, CopyStackDelegateInvoked) { … }
TEST(StackCopierSuspendTest, RewriteRegisters) { … }
}