chromium/base/memory/shared_memory_switch_unittest.cc

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

#include "base/memory/shared_memory_switch.h"

#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/metrics/persistent_histogram_allocator.h"
#include "base/process/launch.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_split.h"
#include "base/strings/stringprintf.h"
#include "base/test/multiprocess_test.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_timeouts.h"
#include "base/unguessable_token.h"
#include "build/build_config.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/multiprocess_func_list.h"

#if BUILDFLAG(IS_POSIX) || BUILDFLAG(IS_FUCHSIA)
#include "base/files/platform_file.h"
#include "base/posix/global_descriptors.h"
#endif

namespace base {
namespace shared_memory {
namespace {

constexpr char kSharedMemoryData[] =;
constexpr char kSharedMemoryGUID[] =;
constexpr char kIsReadOnly[] =;
constexpr size_t kArbitrarySize =;

#if BUILDFLAG(IS_APPLE)
constexpr MachPortsForRendezvous::key_type kArbitraryRendezvousKey = 'smsh';
#elif BUILDFLAG(IS_POSIX)
constexpr GlobalDescriptors::Key kArbitraryDescriptorKey =;
#endif

}  // namespace

MULTIPROCESS_TEST_MAIN(InitFromSwitchValue) {}

// The test suite takes two boolean parameters.
SharedMemorySwitchTest;

// Instantiate tests for all combinations of the two boolean parameters.
INSTANTIATE_TEST_SUITE_P();

TEST_P(SharedMemorySwitchTest, PassViaSwitch) {}

}  // namespace shared_memory
}  // namespace base