#include "base/trace_event/typed_macros.h"
#include "base/location.h"
#include "base/synchronization/waitable_event.h"
#include "base/test/trace_test_utils.h"
#include "base/trace_event/interned_args_helper.h"
#include "base/trace_event/trace_log.h"
#include "base/trace_event/typed_macros_embedder_support.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/perfetto/include/perfetto/protozero/scattered_heap_buffer.h"
#include "third_party/perfetto/include/perfetto/tracing/track_event_interned_data_index.h"
#include "third_party/perfetto/protos/perfetto/trace/interned_data/interned_data.pb.h"
#include "third_party/perfetto/protos/perfetto/trace/trace.pb.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/chrome_mojo_event_info.pbzero.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/log_message.pbzero.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/source_location.pb.h"
#include "third_party/perfetto/protos/perfetto/trace/track_event/source_location.pbzero.h"
#include "base/tracing/perfetto_platform.h"
namespace base {
namespace trace_event {
namespace {
std::unique_ptr<perfetto::TracingSession> g_tracing_session;
void EnableTrace(bool filter_debug_annotations = false) { … }
void CancelTrace() { … }
struct TestTrackEvent;
struct TestTracePacket;
TestTrackEvent* g_test_track_event;
TestTracePacket* g_test_trace_packet;
struct TestTrackEvent : public TrackEventHandle::CompletionListener { … };
struct TestTracePacket : public TracePacketHandle::CompletionListener { … };
TrackEventHandle PrepareTrackEvent(bool filter_debug_annotations) { … }
TrackEventHandle PrepareTrackEventWithDebugAnnotations(TraceEvent*) { … }
TrackEventHandle PrepareTrackEventFilterDebugAnnotations(TraceEvent*) { … }
TracePacketHandle PrepareTracePacket() { … }
void EmitEmptyPacket() { … }
class TypedTraceEventTest : public testing::Test { … };
}
TEST_F(TypedTraceEventTest, CallbackExecutedWhenTracingEnabled) { … }
TEST_F(TypedTraceEventTest, CallbackNotExecutedWhenTracingDisabled) { … }
TEST_F(TypedTraceEventTest, DescriptorPacketWrittenForEventWithTrack) { … }
TEST_F(TypedTraceEventTest, InternedData) { … }
TEST_F(TypedTraceEventTest, DISABLED_InstantThreadEvent) { … }
TEST_F(TypedTraceEventTest, DISABLED_InstantProcessEvent) { … }
TEST_F(TypedTraceEventTest, InstantGlobalEvent) { … }
TEST_F(TypedTraceEventTest, InstantGlobalDefaultEvent) { … }
TEST_F(TypedTraceEventTest, BeginEventOnDefaultTrackDoesNotWriteTrackUuid) { … }
TEST_F(TypedTraceEventTest, EndEventOnDefaultTrackDoesNotWriteTrackUuid) { … }
#define MAYBE_EmptyEvent …
TEST_F(TypedTraceEventTest, MAYBE_EmptyEvent) { … }
TEST_F(TypedTraceEventTest, ChromeMojoInterfaceTag) { … }
class TypedTraceEventFilterDebugAnnotationsTest : public TypedTraceEventTest { … };
TEST_F(TypedTraceEventFilterDebugAnnotationsTest, ChromeMojoInterfaceTag) { … }
}
}