OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/strings/string_split.h" | 11 #include "base/strings/string_split.h" |
12 #include "base/strings/stringprintf.h" | 12 #include "base/strings/stringprintf.h" |
13 #include "base/test/test_timeouts.h" | 13 #include "base/test/test_timeouts.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 #include "build/build_config.h" | |
16 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
17 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 16 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
18 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" | 17 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" |
19 #include "chrome/browser/media/webrtc/webrtc_browsertest_perf.h" | 18 #include "chrome/browser/media/webrtc/webrtc_browsertest_perf.h" |
20 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
21 #include "chrome/browser/ui/browser_tabstrip.h" | 20 #include "chrome/browser/ui/browser_tabstrip.h" |
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
23 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
24 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
25 #include "chrome/test/base/ui_test_utils.h" | 24 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 test::PrintBweForVideoMetrics( | 214 test::PrintBweForVideoMetrics( |
216 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); | 215 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); |
217 test::PrintMetricsForRecvStreams( | 216 test::PrintMetricsForRecvStreams( |
218 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); | 217 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); |
219 | 218 |
220 HangUp(left_tab); | 219 HangUp(left_tab); |
221 HangUp(right_tab); | 220 HangUp(right_tab); |
222 } | 221 } |
223 }; | 222 }; |
224 | 223 |
225 // RunsAudioVideoCall60SecsAndLogsInternalMetrics tests are flaky on Linux. | 224 // This is manual for its long execution time. |
226 // On other platforms, they are manual due to their long execution time. | |
227 // See http://crbug.com/webrtc/6484. | |
228 #if defined(OS_LINUX) | |
229 #define MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8 \ | |
230 DISABLED_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8 | |
231 #define MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9 \ | |
232 DISABLED_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9 | |
233 #define MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 \ | |
234 DISABLED_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 | |
235 #else | |
236 #define MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8 \ | |
237 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8 | |
238 #define MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9 \ | |
239 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9 | |
240 #define MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 \ | |
241 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 | |
242 #endif | |
243 | 225 |
244 IN_PROC_BROWSER_TEST_F( | 226 IN_PROC_BROWSER_TEST_F( |
245 WebRtcPerfBrowserTest, | 227 WebRtcPerfBrowserTest, |
246 MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { | 228 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { |
247 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); | 229 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); |
248 } | 230 } |
249 | 231 |
250 IN_PROC_BROWSER_TEST_F( | 232 IN_PROC_BROWSER_TEST_F( |
251 WebRtcPerfBrowserTest, | 233 WebRtcPerfBrowserTest, |
252 MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { | 234 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { |
253 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); | 235 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); |
254 } | 236 } |
255 | 237 |
256 #if BUILDFLAG(RTC_USE_H264) | 238 #if BUILDFLAG(RTC_USE_H264) |
257 | 239 |
258 IN_PROC_BROWSER_TEST_F( | 240 IN_PROC_BROWSER_TEST_F( |
259 WebRtcPerfBrowserTest, | 241 WebRtcPerfBrowserTest, |
260 MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { | 242 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { |
261 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. | 243 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. |
262 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { | 244 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { |
263 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " | 245 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " |
264 "Skipping WebRtcPerfBrowserTest.MANUAL_RunsAudioVideoCall60SecsAndLogs" | 246 "Skipping WebRtcPerfBrowserTest.MANUAL_RunsAudioVideoCall60SecsAndLogs" |
265 "InternalMetricsH264 (test \"OK\")"; | 247 "InternalMetricsH264 (test \"OK\")"; |
266 return; | 248 return; |
267 } | 249 } |
268 RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264"); | 250 RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264"); |
269 } | 251 } |
270 | 252 |
271 #endif // BUILDFLAG(RTC_USE_H264) | 253 #endif // BUILDFLAG(RTC_USE_H264) |
272 | 254 |
273 IN_PROC_BROWSER_TEST_F( | 255 IN_PROC_BROWSER_TEST_F( |
274 WebRtcPerfBrowserTest, | 256 WebRtcPerfBrowserTest, |
275 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { | 257 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { |
276 RunsOneWayCall60SecsAndLogsInternalMetrics("", false); | 258 RunsOneWayCall60SecsAndLogsInternalMetrics("", false); |
277 } | 259 } |
278 | 260 |
279 IN_PROC_BROWSER_TEST_F( | 261 IN_PROC_BROWSER_TEST_F( |
280 WebRtcPerfBrowserTest, | 262 WebRtcPerfBrowserTest, |
281 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { | 263 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { |
282 RunsOneWayCall60SecsAndLogsInternalMetrics("", true); | 264 RunsOneWayCall60SecsAndLogsInternalMetrics("", true); |
283 } | 265 } |
OLD | NEW |