#include "base/trace_event/memory_allocator_dump.h"
#include <stdint.h>
#include "base/format_macros.h"
#include "base/trace_event/memory_allocator_dump_guid.h"
#include "base/trace_event/memory_dump_provider.h"
#include "base/trace_event/process_memory_dump.h"
#include "base/trace_event/traced_value.h"
#include "base/values.h"
#include "build/build_config.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
ElementsAre;
Eq;
ByRef;
IsEmpty;
namespace base {
namespace trace_event {
namespace {
class FakeMemoryAllocatorDumpProvider : public MemoryDumpProvider { … };
void CheckString(const MemoryAllocatorDump* dump,
const std::string& name,
const char* expected_units,
const std::string& expected_value) { … }
void CheckScalar(const MemoryAllocatorDump* dump,
const std::string& name,
const char* expected_units,
uint64_t expected_value) { … }
}
TEST(MemoryAllocatorDumpTest, GuidGeneration) { … }
TEST(MemoryAllocatorDumpTest, DumpIntoProcessMemoryDump) { … }
TEST(MemoryAllocatorDumpTest, GetSize) { … }
TEST(MemoryAllocatorDumpTest, ReadValues) { … }
TEST(MemoryAllocatorDumpTest, MovingAnEntry) { … }
#if !defined(NDEBUG) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) && \
!BUILDFLAG(IS_FUCHSIA)
TEST(MemoryAllocatorDumpTest, ForbidDuplicatesDeathTest) { … }
TEST(MemoryAllocatorDumpTest, ForbidStringsInBackgroundModeDeathTest) { … }
#endif
}
}