chromium/services/tracing/perfetto/perfetto_integration_unittest.cc

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

#include <memory>
#include <string>
#include <thread>
#include <utility>

#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/test/bind.h"
#include "base/threading/thread.h"
#include "base/tracing/perfetto_platform.h"
#include "services/tracing/perfetto/perfetto_service.h"
#include "services/tracing/perfetto/producer_host.h"
#include "services/tracing/perfetto/test_utils.h"
#include "services/tracing/public/cpp/perfetto/producer_client.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/perfetto/include/perfetto/tracing/tracing.h"
#include "third_party/perfetto/protos/perfetto/common/commit_data_request.pb.h"

// TODO(crbug.com/41457644): Fix memory leaks in tests and re-enable on LSAN.
#ifdef LEAK_SANITIZER
#define MAYBE_DifferentSharedMemoryBuffersForDifferentAgents
#else
#define MAYBE_DifferentSharedMemoryBuffersForDifferentAgents
#endif

namespace tracing {

namespace {

const char kPerfettoTestDataSourceName[] =;

std::string GetPerfettoProducerName() {}

class PerfettoIntegrationTest : public TracingUnitTest {};

TEST_F(PerfettoIntegrationTest, ProducerDatasourceInitialized) {}

TEST_F(PerfettoIntegrationTest, ClientEnabledAndDisabled) {}

TEST_F(PerfettoIntegrationTest, PacketsEndToEndProducerFirst) {}

TEST_F(PerfettoIntegrationTest, PacketsEndToEndConsumerFirst) {}

TEST_F(PerfettoIntegrationTest, CommitDataRequestIsMaybeComplete) {}

TEST_F(PerfettoIntegrationTest, TracingRestarted) {}

TEST_F(PerfettoIntegrationTest, NoPacketsReceivedOnWrongSourceName) {}

TEST_F(PerfettoIntegrationTest,
       MAYBE_DifferentSharedMemoryBuffersForDifferentAgents) {}

TEST_F(PerfettoIntegrationTest, PerfettoPlatformTest) {}

TEST_F(PerfettoIntegrationTest, PerfettoClientLibraryTest) {}

}  // namespace

}  // namespace tracing