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

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

Issue 2841803003: 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
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..3f9100c242da64d987a0605db4c77a6ea7d6b70f 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_P(MatchSendPacketMetrics, rtc_packet_id, "") {
+ 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 &&
+ (base::TimeTicks::Now() - std::get<1>(params).send_time)
+ .InMilliseconds() < 100;
Taylor_Brandstetter 2017/04/25 21:34:19 nit: Could you make the 100 milliseconds an argume
Sergey Ulanov 2017/04/26 00:11:52 +1. This test may be flaky. Also it currently does
Stefan 2017/04/26 09:02:39 Done.
+}
+
#endif // CONTENT_BROWSER_RENDERER_HOST_P2P_SOCKET_HOST_TEST_UTILS_H_

Powered by Google App Engine
This is Rietveld 408576698