#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"
#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) { … }
}
}