Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: webrtc/pc/rtcstats_integrationtest.cc

Issue 2979203002: Enable tracing on rtcstats_integrationtest.cc (Closed)
Patch Set: Increase buffer size to 1024. Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/pc/rtcstatscollector.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/rtcstats_integrationtest.cc
diff --git a/webrtc/pc/rtcstats_integrationtest.cc b/webrtc/pc/rtcstats_integrationtest.cc
index a385d6c2f960a79b5ba6f3e112aa4f29ee90f236..019496d98ecc472ef949b6296a2d7d8ea995eea1 100644
--- a/webrtc/pc/rtcstats_integrationtest.cc
+++ b/webrtc/pc/rtcstats_integrationtest.cc
@@ -20,6 +20,7 @@
#include "webrtc/pc/test/peerconnectiontestwrapper.h"
#include "webrtc/pc/test/rtcstatsobtainer.h"
#include "webrtc/rtc_base/checks.h"
+#include "webrtc/rtc_base/event_tracer.h"
#include "webrtc/rtc_base/gunit.h"
#include "webrtc/rtc_base/refcountedobject.h"
#include "webrtc/rtc_base/scoped_ref_ptr.h"
@@ -30,12 +31,32 @@ namespace webrtc {
namespace {
const int64_t kGetStatsTimeoutMs = 10000;
+const unsigned char* kWebRTCStatsCategory =
+ reinterpret_cast<const unsigned char*>("webrtc_stats");
tommi 2017/07/18 12:22:54 static_cast, however the cast shouldn't be here.
ehmaldonado_webrtc 2017/07/18 12:36:19 I get: error: static_cast from 'const char *' to
+
+static const unsigned char* GetCategoryEnabledHandler(const char* name) {
+ return kWebRTCStatsCategory;
+}
+
+static void AddTraceEventHandler(char phase,
+ const unsigned char* category_enabled,
+ const char* name,
+ unsigned long long id,
+ int num_args,
+ const char** arg_names,
+ const unsigned char* arg_types,
+ const unsigned long long* arg_values,
+ unsigned char flags) {
+ // Do nothing
+}
class RTCStatsIntegrationTest : public testing::Test {
public:
RTCStatsIntegrationTest()
: network_thread_(new rtc::Thread(&virtual_socket_server_)),
worker_thread_(rtc::Thread::Create()) {
+ SetupEventTracer(&GetCategoryEnabledHandler, &AddTraceEventHandler);
+
RTC_CHECK(network_thread_->Start());
RTC_CHECK(worker_thread_->Start());
« no previous file with comments | « no previous file | webrtc/pc/rtcstatscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698