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" |
15 #include "chrome/browser/browser_process.h" | 16 #include "chrome/browser/browser_process.h" |
16 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 17 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
17 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" | 18 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" |
18 #include "chrome/browser/media/webrtc/webrtc_browsertest_perf.h" | 19 #include "chrome/browser/media/webrtc/webrtc_browsertest_perf.h" |
19 #include "chrome/browser/ui/browser.h" | 20 #include "chrome/browser/ui/browser.h" |
20 #include "chrome/browser/ui/browser_tabstrip.h" | 21 #include "chrome/browser/ui/browser_tabstrip.h" |
21 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 22 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
22 #include "chrome/common/chrome_switches.h" | 23 #include "chrome/common/chrome_switches.h" |
23 #include "chrome/test/base/in_process_browser_test.h" | 24 #include "chrome/test/base/in_process_browser_test.h" |
24 #include "chrome/test/base/ui_test_utils.h" | 25 #include "chrome/test/base/ui_test_utils.h" |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 test::PrintBweForVideoMetrics( | 215 test::PrintBweForVideoMetrics( |
215 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); | 216 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); |
216 test::PrintMetricsForRecvStreams( | 217 test::PrintMetricsForRecvStreams( |
217 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); | 218 *second_pc_dict, MakePerfTestLabel("_recvonly", opus_dtx), video_codec); |
218 | 219 |
219 HangUp(left_tab); | 220 HangUp(left_tab); |
220 HangUp(right_tab); | 221 HangUp(right_tab); |
221 } | 222 } |
222 }; | 223 }; |
223 | 224 |
224 // This is manual for its long execution time. | 225 // RunsAudioVideoCall60SecsAndLogsInternalMetrics tests are flaky on Linux. |
| 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 |
225 | 243 |
226 IN_PROC_BROWSER_TEST_F( | 244 IN_PROC_BROWSER_TEST_F( |
227 WebRtcPerfBrowserTest, | 245 WebRtcPerfBrowserTest, |
228 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { | 246 MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { |
229 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); | 247 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); |
230 } | 248 } |
231 | 249 |
232 IN_PROC_BROWSER_TEST_F( | 250 IN_PROC_BROWSER_TEST_F( |
233 WebRtcPerfBrowserTest, | 251 WebRtcPerfBrowserTest, |
234 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { | 252 MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { |
235 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); | 253 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); |
236 } | 254 } |
237 | 255 |
238 #if BUILDFLAG(RTC_USE_H264) | 256 #if BUILDFLAG(RTC_USE_H264) |
239 | 257 |
240 IN_PROC_BROWSER_TEST_F( | 258 IN_PROC_BROWSER_TEST_F( |
241 WebRtcPerfBrowserTest, | 259 WebRtcPerfBrowserTest, |
242 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { | 260 MAYBE_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { |
243 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. | 261 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. |
244 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { | 262 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { |
245 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " | 263 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " |
246 "Skipping WebRtcPerfBrowserTest.MANUAL_RunsAudioVideoCall60SecsAndLogs" | 264 "Skipping WebRtcPerfBrowserTest.MANUAL_RunsAudioVideoCall60SecsAndLogs" |
247 "InternalMetricsH264 (test \"OK\")"; | 265 "InternalMetricsH264 (test \"OK\")"; |
248 return; | 266 return; |
249 } | 267 } |
250 RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264"); | 268 RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264"); |
251 } | 269 } |
252 | 270 |
253 #endif // BUILDFLAG(RTC_USE_H264) | 271 #endif // BUILDFLAG(RTC_USE_H264) |
254 | 272 |
255 IN_PROC_BROWSER_TEST_F( | 273 IN_PROC_BROWSER_TEST_F( |
256 WebRtcPerfBrowserTest, | 274 WebRtcPerfBrowserTest, |
257 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { | 275 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { |
258 RunsOneWayCall60SecsAndLogsInternalMetrics("", false); | 276 RunsOneWayCall60SecsAndLogsInternalMetrics("", false); |
259 } | 277 } |
260 | 278 |
261 IN_PROC_BROWSER_TEST_F( | 279 IN_PROC_BROWSER_TEST_F( |
262 WebRtcPerfBrowserTest, | 280 WebRtcPerfBrowserTest, |
263 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { | 281 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { |
264 RunsOneWayCall60SecsAndLogsInternalMetrics("", true); | 282 RunsOneWayCall60SecsAndLogsInternalMetrics("", true); |
265 } | 283 } |
OLD | NEW |