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

Unified Diff: chrome/browser/media/webrtc_perf_browsertest.cc

Issue 2190533002: Adds a WebRTC browser_test with opus dtx enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: chrome/browser/media/webrtc_perf_browsertest.cc
diff --git a/chrome/browser/media/webrtc_perf_browsertest.cc b/chrome/browser/media/webrtc_perf_browsertest.cc
index d3957850fceb6218e403a7238a7e35c6a0e20724..159964a34f44a06515c24d26b0bd79388c7f814c 100644
--- a/chrome/browser/media/webrtc_perf_browsertest.cc
+++ b/chrome/browser/media/webrtc_perf_browsertest.cc
@@ -106,7 +106,8 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase {
}
void RunsAudioVideoCall60SecsAndLogsInternalMetrics(
phoglund_chromium 2016/07/27 09:15:05 You're not using opus_dtx for two-way calls, so re
Ivo-OOO until feb 6 2016/07/27 14:12:43 Done.
- const std::string& video_codec) {
+ const std::string& video_codec,
+ bool opus_dtx) {
ASSERT_TRUE(test::HasReferenceFilesInCheckout());
ASSERT_TRUE(embedded_test_server()->Start());
@@ -122,7 +123,7 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase {
SetupPeerconnectionWithLocalStream(left_tab);
SetupPeerconnectionWithLocalStream(right_tab);
- NegotiateCall(left_tab, right_tab, video_codec);
+ NegotiateCall(left_tab, right_tab, video_codec, opus_dtx);
StartDetectingVideo(left_tab, "remote-view");
StartDetectingVideo(right_tab, "remote-view");
@@ -141,15 +142,18 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase {
const base::DictionaryValue* first_pc_dict =
GetDataOnPeerConnection(all_data.get(), 0);
ASSERT_TRUE(first_pc_dict != NULL);
- test::PrintBweForVideoMetrics(*first_pc_dict, "", video_codec);
- test::PrintMetricsForAllStreams(*first_pc_dict, "", video_codec);
+ test::PrintBweForVideoMetrics(*first_pc_dict, opus_dtx ? "opus_dtx" : "",
+ video_codec);
+ test::PrintMetricsForAllStreams(*first_pc_dict, opus_dtx ? "opus_dtx" : "",
+ video_codec);
HangUp(left_tab);
HangUp(right_tab);
}
void RunsOneWayCall60SecsAndLogsInternalMetrics(
- const std::string& video_codec) {
+ const std::string& video_codec,
+ bool opus_dtx) {
ASSERT_TRUE(test::HasReferenceFilesInCheckout());
ASSERT_TRUE(embedded_test_server()->Start());
@@ -165,7 +169,7 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase {
SetupPeerconnectionWithLocalStream(left_tab);
SetupPeerconnectionWithoutLocalStream(right_tab);
- NegotiateCall(left_tab, right_tab, video_codec);
+ NegotiateCall(left_tab, right_tab, video_codec, opus_dtx);
// Remote video will only play in one tab since the call is one-way.
StartDetectingVideo(right_tab, "remote-view");
@@ -183,14 +187,22 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase {
const base::DictionaryValue* first_pc_dict =
GetDataOnPeerConnection(all_data.get(), 0);
ASSERT_TRUE(first_pc_dict != NULL);
- test::PrintBweForVideoMetrics(*first_pc_dict, "_sendonly", video_codec);
- test::PrintMetricsForSendStreams(*first_pc_dict, "_sendonly", video_codec);
+ test::PrintBweForVideoMetrics(
+ *first_pc_dict, opus_dtx ? "_sendonly_with_opus_dtx" : "_sendonly",
+ video_codec);
+ test::PrintMetricsForSendStreams(
+ *first_pc_dict, opus_dtx ? "_sendonly_with_opus_dtx" : "_sendonly",
+ video_codec);
const base::DictionaryValue* second_pc_dict =
GetDataOnPeerConnection(all_data.get(), 1);
ASSERT_TRUE(second_pc_dict != NULL);
- test::PrintBweForVideoMetrics(*second_pc_dict, "_recvonly", video_codec);
- test::PrintMetricsForRecvStreams(*second_pc_dict, "_recvonly", video_codec);
+ test::PrintBweForVideoMetrics(
+ *second_pc_dict, opus_dtx ? "_recvonly_with_opus_dtx" : "_recvonly",
+ video_codec);
+ test::PrintMetricsForRecvStreams(
+ *second_pc_dict, opus_dtx ? "_recvonly_with_opus_dtx" : "_recvonly",
+ video_codec);
HangUp(left_tab);
HangUp(right_tab);
@@ -202,13 +214,13 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase {
IN_PROC_BROWSER_TEST_F(
WebRtcPerfBrowserTest,
MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) {
- RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8");
+ RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8", false);
}
IN_PROC_BROWSER_TEST_F(
WebRtcPerfBrowserTest,
MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) {
- RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9");
+ RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9", false);
}
#if BUILDFLAG(RTC_USE_H264)
@@ -223,7 +235,7 @@ IN_PROC_BROWSER_TEST_F(
"InternalMetricsH264 (test \"OK\")";
return;
}
- RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264");
+ RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264", false);
}
#endif // BUILDFLAG(RTC_USE_H264)
@@ -231,5 +243,11 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F(
WebRtcPerfBrowserTest,
MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) {
- RunsOneWayCall60SecsAndLogsInternalMetrics("");
+ RunsOneWayCall60SecsAndLogsInternalMetrics("", false);
+}
+
+IN_PROC_BROWSER_TEST_F(
+ WebRtcPerfBrowserTest,
+ MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) {
+ RunsOneWayCall60SecsAndLogsInternalMetrics("", true);
}

Powered by Google App Engine
This is Rietveld 408576698