Add directive to make TRACE_EVENT macros optional.
Bug: webrtc:11132
Change-Id: I801994ad262e1acff73e4c20afd7a7343b56268c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/160654
Commit-Queue: Doudou Kisabaka <doudouk@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29949}
diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc
index cd61678..075dc63 100644
--- a/pc/rtc_stats_integrationtest.cc
+++ b/pc/rtc_stats_integrationtest.cc
@@ -998,7 +998,10 @@
rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCaller();
RTCStatsReportVerifier(report.get()).VerifyReport({});
+
+ #if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(report->ToJson(), RTCStatsReportTraceListener::last_trace());
+ #endif
}
TEST_F(RTCStatsIntegrationTest, GetStatsFromCallee) {
@@ -1006,7 +1009,10 @@
rtc::scoped_refptr<const RTCStatsReport> report = GetStatsFromCallee();
RTCStatsReportVerifier(report.get()).VerifyReport({});
+
+ #if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(report->ToJson(), RTCStatsReportTraceListener::last_trace());
+ #endif
}
// These tests exercise the integration of the stats selection algorithm inside
@@ -1086,8 +1092,10 @@
// Any pending stats requests should have completed in the act of destroying
// the peer connection.
ASSERT_TRUE(stats_obtainer->report());
+ #if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(stats_obtainer->report()->ToJson(),
RTCStatsReportTraceListener::last_trace());
+ #endif
}
TEST_F(RTCStatsIntegrationTest, GetsStatsWhileClosingPeerConnection) {
@@ -1099,8 +1107,10 @@
caller_->pc()->Close();
ASSERT_TRUE(stats_obtainer->report());
+ #if RTC_TRACE_EVENTS_ENABLED
EXPECT_EQ(stats_obtainer->report()->ToJson(),
RTCStatsReportTraceListener::last_trace());
+ #endif
}
// GetStatsReferencedIds() is optimized to recognize what is or isn't a