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/test/test_timeouts.h" | 12 #include "base/test/test_timeouts.h" |
| 13 #include "base/threading/thread_restrictions.h" |
13 #include "base/time/time.h" | 14 #include "base/time/time.h" |
14 #include "chrome/browser/browser_process.h" | 15 #include "chrome/browser/browser_process.h" |
15 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 16 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
16 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" | 17 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" |
17 #include "chrome/browser/media/webrtc/webrtc_browsertest_perf.h" | 18 #include "chrome/browser/media/webrtc/webrtc_browsertest_perf.h" |
18 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_tabstrip.h" | 20 #include "chrome/browser/ui/browser_tabstrip.h" |
20 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
21 #include "chrome/common/chrome_switches.h" | 22 #include "chrome/common/chrome_switches.h" |
22 #include "chrome/test/base/in_process_browser_test.h" | 23 #include "chrome/test/base/in_process_browser_test.h" |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 // This is manual for its long execution time. |
225 | 226 |
226 IN_PROC_BROWSER_TEST_F( | 227 IN_PROC_BROWSER_TEST_F( |
227 WebRtcInternalsPerfBrowserTest, | 228 WebRtcInternalsPerfBrowserTest, |
228 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { | 229 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { |
| 230 base::ThreadRestrictions::ScopedAllowIO allow_io; |
229 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); | 231 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); |
230 } | 232 } |
231 | 233 |
232 IN_PROC_BROWSER_TEST_F( | 234 IN_PROC_BROWSER_TEST_F( |
233 WebRtcInternalsPerfBrowserTest, | 235 WebRtcInternalsPerfBrowserTest, |
234 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { | 236 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { |
| 237 base::ThreadRestrictions::ScopedAllowIO allow_io; |
235 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); | 238 RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); |
236 } | 239 } |
237 | 240 |
238 #if BUILDFLAG(RTC_USE_H264) | 241 #if BUILDFLAG(RTC_USE_H264) |
239 | 242 |
240 // Flaky on Windows, crbug.com/703579. | 243 // Flaky on Windows, crbug.com/703579. |
241 #if defined(OS_WIN) | 244 #if defined(OS_WIN) |
242 #define MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 \ | 245 #define MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 \ |
243 DISABLED_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 | 246 DISABLED_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 |
244 #else | 247 #else |
245 #define MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 \ | 248 #define MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 \ |
246 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 | 249 MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 |
247 #endif | 250 #endif |
248 IN_PROC_BROWSER_TEST_F( | 251 IN_PROC_BROWSER_TEST_F( |
249 WebRtcInternalsPerfBrowserTest, | 252 WebRtcInternalsPerfBrowserTest, |
250 MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { | 253 MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { |
| 254 base::ThreadRestrictions::ScopedAllowIO allow_io; |
251 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. | 255 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. |
252 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { | 256 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { |
253 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " | 257 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " |
254 "Skipping WebRtcInternalsPerfBrowserTest." | 258 "Skipping WebRtcInternalsPerfBrowserTest." |
255 "MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 (test " | 259 "MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264 (test " |
256 "\"OK\")"; | 260 "\"OK\")"; |
257 return; | 261 return; |
258 } | 262 } |
259 RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264"); | 263 RunsAudioVideoCall60SecsAndLogsInternalMetrics("H264"); |
260 } | 264 } |
261 | 265 |
262 #endif // BUILDFLAG(RTC_USE_H264) | 266 #endif // BUILDFLAG(RTC_USE_H264) |
263 | 267 |
264 IN_PROC_BROWSER_TEST_F( | 268 IN_PROC_BROWSER_TEST_F( |
265 WebRtcInternalsPerfBrowserTest, | 269 WebRtcInternalsPerfBrowserTest, |
266 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { | 270 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { |
| 271 base::ThreadRestrictions::ScopedAllowIO allow_io; |
267 RunsOneWayCall60SecsAndLogsInternalMetrics("", false); | 272 RunsOneWayCall60SecsAndLogsInternalMetrics("", false); |
268 } | 273 } |
269 | 274 |
270 IN_PROC_BROWSER_TEST_F( | 275 IN_PROC_BROWSER_TEST_F( |
271 WebRtcInternalsPerfBrowserTest, | 276 WebRtcInternalsPerfBrowserTest, |
272 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { | 277 MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { |
| 278 base::ThreadRestrictions::ScopedAllowIO allow_io; |
273 RunsOneWayCall60SecsAndLogsInternalMetrics("", true); | 279 RunsOneWayCall60SecsAndLogsInternalMetrics("", true); |
274 } | 280 } |
OLD | NEW |