chromium/services/tracing/public/cpp/system_tracing_service_unittest.cc

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

#include "services/tracing/public/cpp/system_tracing_service.h"

#include <unistd.h>

#include <optional>

#include "base/files/scoped_temp_dir.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "services/tracing/perfetto/system_test_utils.h"
#include "services/tracing/public/cpp/perfetto/perfetto_traced_process.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace tracing {

const char* kProducerSockEnvName =;

namespace {

class SystemTracingServiceTest : public testing::Test {};

// Test the OpenProducerSocket implementation. Expect a valid socket file
// descriptor returned in the callback.
TEST_F(SystemTracingServiceTest, OpenProducerSocket) {}

// Test the OpenProducerSocket implementation with a nonexistent socket. Expect
// an invalid socket file descriptor returned in the callback.
TEST_F(SystemTracingServiceTest, OpenProducerSocket_Nonexistent) {}

// Test the OpenProducerSocket implementation through mojo. Expect that the
// callback runs when invoked through mojo.
TEST_F(SystemTracingServiceTest, BindAndPassPendingRemote) {}

// Test the OpenProducerSocket implementation through mojo with a nonexistent
// socket. Expect that the callback runs with an invalid socket file descriptor
TEST_F(SystemTracingServiceTest, BindAndPassPendingRemote_Nonexistent) {}

}  // namespace
}  // namespace tracing