Chromium Code Reviews| 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..65a0338db364a83371968a7da14ee3a9a525ac41 100644 |
| --- a/chrome/browser/media/webrtc_perf_browsertest.cc |
| +++ b/chrome/browser/media/webrtc_perf_browsertest.cc |
| @@ -122,7 +122,11 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase { |
| SetupPeerconnectionWithLocalStream(left_tab); |
| SetupPeerconnectionWithLocalStream(right_tab); |
| - NegotiateCall(left_tab, right_tab, video_codec); |
| + if (!video_codec.empty()) { |
| + SetDefaultVideoCodec(left_tab, video_codec); |
| + SetDefaultVideoCodec(right_tab, video_codec); |
| + } |
| + NegotiateCall(left_tab, right_tab); |
| StartDetectingVideo(left_tab, "remote-view"); |
| StartDetectingVideo(right_tab, "remote-view"); |
| @@ -149,7 +153,8 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase { |
| } |
| 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 +170,15 @@ class WebRtcPerfBrowserTest : public WebRtcTestBase { |
| SetupPeerconnectionWithLocalStream(left_tab); |
| SetupPeerconnectionWithoutLocalStream(right_tab); |
| - NegotiateCall(left_tab, right_tab, video_codec); |
| + if (!video_codec.empty()) { |
| + SetDefaultVideoCodec(left_tab, video_codec); |
| + SetDefaultVideoCodec(right_tab, video_codec); |
| + } |
| + if (opus_dtx) { |
| + EnableOpusDtx(left_tab); |
| + EnableOpusDtx(right_tab); |
| + } |
| + NegotiateCall(left_tab, right_tab); |
| // Remote video will only play in one tab since the call is one-way. |
| StartDetectingVideo(right_tab, "remote-view"); |
| @@ -183,14 +196,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", |
|
phoglund_chromium
2016/07/28 06:39:01
Maybe pull this out to a helper _MakePerfTestLabel
Ivo-OOO until feb 6
2016/07/28 12:29:31
Done.
|
| + 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); |
| @@ -231,5 +252,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); |
| } |