OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <string> | 5 #include <string> |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/test/test_timeouts.h" | 8 #include "base/test/test_timeouts.h" |
| 9 #include "base/threading/thread_restrictions.h" |
9 #include "base/time/time.h" | 10 #include "base/time/time.h" |
10 #include "chrome/browser/media/webrtc/test_stats_dictionary.h" | 11 #include "chrome/browser/media/webrtc/test_stats_dictionary.h" |
11 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" | 12 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" |
12 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" | 13 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" |
13 #include "content/public/common/content_switches.h" | 14 #include "content/public/common/content_switches.h" |
14 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h" | 15 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h" |
15 #include "media/base/media_switches.h" | 16 #include "media/base/media_switches.h" |
16 #include "testing/perf/perf_test.h" | 17 #include "testing/perf/perf_test.h" |
17 | 18 |
18 namespace content { | 19 namespace content { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 } | 226 } |
226 | 227 |
227 private: | 228 private: |
228 content::WebContents* left_tab_ = nullptr; | 229 content::WebContents* left_tab_ = nullptr; |
229 content::WebContents* right_tab_ = nullptr; | 230 content::WebContents* right_tab_ = nullptr; |
230 }; | 231 }; |
231 | 232 |
232 IN_PROC_BROWSER_TEST_F( | 233 IN_PROC_BROWSER_TEST_F( |
233 WebRtcStatsPerfBrowserTest, | 234 WebRtcStatsPerfBrowserTest, |
234 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_opus) { | 235 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_opus) { |
| 236 base::ThreadRestrictions::ScopedAllowIO allow_io; |
235 RunsAudioAndVideoCallCollectingMetrics("opus", kUseDefaultVideoCodec); | 237 RunsAudioAndVideoCallCollectingMetrics("opus", kUseDefaultVideoCodec); |
236 } | 238 } |
237 | 239 |
238 IN_PROC_BROWSER_TEST_F( | 240 IN_PROC_BROWSER_TEST_F( |
239 WebRtcStatsPerfBrowserTest, | 241 WebRtcStatsPerfBrowserTest, |
240 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_ISAC) { | 242 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_ISAC) { |
| 243 base::ThreadRestrictions::ScopedAllowIO allow_io; |
241 RunsAudioAndVideoCallCollectingMetrics("ISAC", kUseDefaultVideoCodec); | 244 RunsAudioAndVideoCallCollectingMetrics("ISAC", kUseDefaultVideoCodec); |
242 } | 245 } |
243 | 246 |
244 IN_PROC_BROWSER_TEST_F( | 247 IN_PROC_BROWSER_TEST_F( |
245 WebRtcStatsPerfBrowserTest, | 248 WebRtcStatsPerfBrowserTest, |
246 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_G722) { | 249 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_G722) { |
| 250 base::ThreadRestrictions::ScopedAllowIO allow_io; |
247 RunsAudioAndVideoCallCollectingMetrics("G722", kUseDefaultVideoCodec); | 251 RunsAudioAndVideoCallCollectingMetrics("G722", kUseDefaultVideoCodec); |
248 } | 252 } |
249 | 253 |
250 IN_PROC_BROWSER_TEST_F( | 254 IN_PROC_BROWSER_TEST_F( |
251 WebRtcStatsPerfBrowserTest, | 255 WebRtcStatsPerfBrowserTest, |
252 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMU) { | 256 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMU) { |
| 257 base::ThreadRestrictions::ScopedAllowIO allow_io; |
253 RunsAudioAndVideoCallCollectingMetrics("PCMU", kUseDefaultVideoCodec); | 258 RunsAudioAndVideoCallCollectingMetrics("PCMU", kUseDefaultVideoCodec); |
254 } | 259 } |
255 | 260 |
256 IN_PROC_BROWSER_TEST_F( | 261 IN_PROC_BROWSER_TEST_F( |
257 WebRtcStatsPerfBrowserTest, | 262 WebRtcStatsPerfBrowserTest, |
258 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMA) { | 263 MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMA) { |
| 264 base::ThreadRestrictions::ScopedAllowIO allow_io; |
259 RunsAudioAndVideoCallCollectingMetrics("PCMA", kUseDefaultVideoCodec); | 265 RunsAudioAndVideoCallCollectingMetrics("PCMA", kUseDefaultVideoCodec); |
260 } | 266 } |
261 | 267 |
262 IN_PROC_BROWSER_TEST_F( | 268 IN_PROC_BROWSER_TEST_F( |
263 WebRtcStatsPerfBrowserTest, | 269 WebRtcStatsPerfBrowserTest, |
264 MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP8) { | 270 MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP8) { |
| 271 base::ThreadRestrictions::ScopedAllowIO allow_io; |
265 RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP8"); | 272 RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP8"); |
266 } | 273 } |
267 | 274 |
268 IN_PROC_BROWSER_TEST_F( | 275 IN_PROC_BROWSER_TEST_F( |
269 WebRtcStatsPerfBrowserTest, | 276 WebRtcStatsPerfBrowserTest, |
270 MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP9) { | 277 MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP9) { |
| 278 base::ThreadRestrictions::ScopedAllowIO allow_io; |
271 RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP9"); | 279 RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP9"); |
272 } | 280 } |
273 | 281 |
274 #if BUILDFLAG(RTC_USE_H264) | 282 #if BUILDFLAG(RTC_USE_H264) |
275 | 283 |
276 IN_PROC_BROWSER_TEST_F( | 284 IN_PROC_BROWSER_TEST_F( |
277 WebRtcStatsPerfBrowserTest, | 285 WebRtcStatsPerfBrowserTest, |
278 MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264) { | 286 MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264) { |
| 287 base::ThreadRestrictions::ScopedAllowIO allow_io; |
279 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. | 288 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. |
280 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { | 289 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { |
281 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " | 290 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " |
282 "Skipping WebRtcPerfBrowserTest." | 291 "Skipping WebRtcPerfBrowserTest." |
283 "MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264 (test " | 292 "MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264 (test " |
284 "\"OK\")"; | 293 "\"OK\")"; |
285 return; | 294 return; |
286 } | 295 } |
287 RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "H264"); | 296 RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "H264"); |
288 } | 297 } |
289 | 298 |
290 #endif // BUILDFLAG(RTC_USE_H264) | 299 #endif // BUILDFLAG(RTC_USE_H264) |
291 | 300 |
292 IN_PROC_BROWSER_TEST_F( | 301 IN_PROC_BROWSER_TEST_F( |
293 WebRtcStatsPerfBrowserTest, | 302 WebRtcStatsPerfBrowserTest, |
294 MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Promise) { | 303 MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Promise) { |
| 304 base::ThreadRestrictions::ScopedAllowIO allow_io; |
295 RunsAudioAndVideoCallMeasuringGetStatsPerformance( | 305 RunsAudioAndVideoCallMeasuringGetStatsPerformance( |
296 GetStatsVariation::PROMISE_BASED); | 306 GetStatsVariation::PROMISE_BASED); |
297 } | 307 } |
298 | 308 |
299 IN_PROC_BROWSER_TEST_F( | 309 IN_PROC_BROWSER_TEST_F( |
300 WebRtcStatsPerfBrowserTest, | 310 WebRtcStatsPerfBrowserTest, |
301 MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Callback) { | 311 MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Callback) { |
| 312 base::ThreadRestrictions::ScopedAllowIO allow_io; |
302 RunsAudioAndVideoCallMeasuringGetStatsPerformance( | 313 RunsAudioAndVideoCallMeasuringGetStatsPerformance( |
303 GetStatsVariation::CALLBACK_BASED); | 314 GetStatsVariation::CALLBACK_BASED); |
304 } | 315 } |
305 | 316 |
306 } // namespace | 317 } // namespace |
307 | 318 |
308 } // namespace content | 319 } // namespace content |
OLD | NEW |