chromium/base/profiler/stack_copier_suspend_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40284755): Remove this and spanify to fix the errors.
#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;

// A thread delegate for use in tests that provides the expected behavior when
// operating on the supplied fake stack.
class TestSuspendableThreadDelegate : public SuspendableThreadDelegate {};

class TestStackCopierDelegate : public StackCopier::Delegate {};

}  // namespace

TEST(StackCopierSuspendTest, CopyStack) {}

TEST(StackCopierSuspendTest, CopyStackBufferTooSmall) {}

TEST(StackCopierSuspendTest, CopyStackAndRewritePointers) {}

TEST(StackCopierSuspendTest, CopyStackTimeStamp) {}

TEST(StackCopierSuspendTest, CopyStackDelegateInvoked) {}

TEST(StackCopierSuspendTest, RewriteRegisters) {}

}  // namespace base