#include "components/services/heap_profiling/public/cpp/switches.h"
#include "base/command_line.h"
#include "base/test/scoped_command_line.h"
#include "base/test/scoped_feature_list.h"
#include "components/services/heap_profiling/public/cpp/settings.h"
#include "partition_alloc/buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace heap_profiling {
#if PA_BUILDFLAG(USE_ALLOCATOR_SHIM)
TEST(HeapProfilingSwitches, GetModeForStartup_Default) { … }
TEST(HeapProfilingSwitches, GetModeForStartup_Commandline) { … }
#else
TEST(HeapProfilingSwitches, GetModeForStartup_NoModeWithoutShim) {
{
base::test::ScopedCommandLine scoped_command_line;
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(kMemlogMode,
kMemlogModeAll);
EXPECT_EQ(Mode::kNone, GetModeForStartup());
}
}
#endif
}