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

Unified Diff: webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc

Issue 2996933003: Add logging of host lookups made by TurnPort to the RtcEventLog. (Closed)
Patch Set: review Created 3 years, 4 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
Index: webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
diff --git a/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc b/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
index 9d98855d4af9deda2b4b85da37ef9f9965b41474..ebdff03ab12825636daf1382768797b153de63f7 100644
--- a/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
+++ b/webrtc/logging/rtc_event_log/rtc_event_log_unittest_helper.cc
@@ -570,4 +570,20 @@ void RtcEventLogTestHelper::VerifyProbeResultFailure(
// TODO(philipel): Verify the parser when parsing has been implemented.
}
+void RtcEventLogTestHelper::VerifyLogHostLookupEvent(
+ const ParsedRtcEventLog& parsed_log,
+ size_t index,
+ int error,
+ int64_t host_lookup_time_ms) {
+ const rtclog::Event& event = parsed_log.events_[index];
+ ASSERT_TRUE(IsValidBasicEvent(event));
+ EXPECT_EQ(rtclog::Event::HOST_LOOKUP_EVENT, event.type());
+
+ const rtclog::HostLookupResult& lookup_event = event.host_lookup_result();
+ ASSERT_TRUE(lookup_event.has_error());
+ ASSERT_EQ(lookup_event.error(), error);
+ ASSERT_TRUE(lookup_event.has_host_lookup_time_ms());
+ ASSERT_EQ(lookup_event.host_lookup_time_ms(), host_lookup_time_ms);
terelius 2017/08/21 09:38:14 In addition to this code, could you also read the
+}
+
} // namespace webrtc

Powered by Google App Engine
This is Rietveld 408576698