chromium/mojo/core/test/mojo_test_suite_base.cc

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

#include "mojo/core/test/mojo_test_suite_base.h"

#include "base/base_switches.h"
#include "base/check.h"
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/strings/string_util.h"
#include "base/test/scoped_feature_list.h"
#include "build/build_config.h"
#include "mojo/core/test/scoped_mojo_support.h"
#include "mojo/core/test/test_switches.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace mojo::core::test {

namespace {

// Manual tests only run when --run-manual is specified. This allows writing
// tests that don't run automatically but are still in the same test binary.
// This is useful so that a team that wants to run a few tests doesn't have to
// add a new binary that must be compiled on all builds.
constexpr char kRunManualTestsFlag[] =;

// Tests starting with 'MANUAL_' are skipped unless the
// command line flag `kRunManualTestsFlag`  is supplied.
constexpr char kManualTestPrefix[] =;

class SkipManualTests : public testing::EmptyTestEventListener {};

// Ensures that every test gets its own freshly initialized Mojo Core instance
// and IO dedicated thread.
class MojoSupportForEachTest : public testing::EmptyTestEventListener {};

}  // namespace

MojoTestSuiteBase::MojoTestSuiteBase(int argc, char** argv)
    :{}

#if BUILDFLAG(IS_WIN)
MojoTestSuiteBase::MojoTestSuiteBase(int argc, wchar_t** argv)
    : base::TestSuite(argc, argv) {}
#endif  // BUILDFLAG(IS_WIN)

MojoTestSuiteBase::~MojoTestSuiteBase() = default;

void MojoTestSuiteBase::Initialize() {}

void MojoTestSuiteBase::Shutdown() {}

void MojoTestSuiteBase::MaybeInitializeChildProcessEnvironment() {}

}  // namespace mojo::core::test