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

Unified Diff: content/browser/renderer_host/p2p/socket_host_test_utils.h

Issue 2846243002: Wire up rtc_packet_ids to P2PSocketHostTcp, which is required for correct BWE in WebRTC. (Closed)
Patch Set: Created 3 years, 8 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 | « content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/p2p/socket_host_test_utils.h
diff --git a/content/browser/renderer_host/p2p/socket_host_test_utils.h b/content/browser/renderer_host/p2p/socket_host_test_utils.h
index 8d2d2440fc5cb4017318d77847d5689dea5c3b97..7b7552f9c7b8f22ed448570d1350a6bbb2c9c9b2 100644
--- a/content/browser/renderer_host/p2p/socket_host_test_utils.h
+++ b/content/browser/renderer_host/p2p/socket_host_test_utils.h
@@ -123,4 +123,15 @@ MATCHER_P(MatchIncomingSocketMessage, address, "") {
return std::get<1>(params) == address;
}
+MATCHER_P2(MatchSendPacketMetrics, rtc_packet_id, test_start_time, "") {
+ if (arg->type() != P2PMsg_OnSendComplete::ID)
+ return false;
+
+ P2PMsg_OnSendComplete::Param params;
+ P2PMsg_OnSendComplete::Read(arg, &params);
+ return std::get<1>(params).rtc_packet_id == rtc_packet_id &&
+ std::get<1>(params).send_time >= test_start_time &&
+ std::get<1>(params).send_time <= base::TimeTicks::Now();
+}
+
#endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_
« no previous file with comments | « content/browser/renderer_host/p2p/socket_host_tcp_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698