Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: chrome/browser/media/webrtc/webrtc_video_quality_browsertest.cc

Issue 2840333004: Allow IO thread usage in WebRTC browsertests (Closed)
Patch Set: jam@ comments. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_stats_perf_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "base/base64.h" 7 #include "base/base64.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/environment.h" 9 #include "base/environment.h"
10 #include "base/files/file.h" 10 #include "base/files/file.h"
11 #include "base/files/file_util.h" 11 #include "base/files/file_util.h"
12 #include "base/files/scoped_temp_dir.h" 12 #include "base/files/scoped_temp_dir.h"
13 #include "base/path_service.h" 13 #include "base/path_service.h"
14 #include "base/process/launch.h" 14 #include "base/process/launch.h"
15 #include "base/strings/string_number_conversions.h" 15 #include "base/strings/string_number_conversions.h"
16 #include "base/strings/string_split.h" 16 #include "base/strings/string_split.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/test/test_timeouts.h" 18 #include "base/test/test_timeouts.h"
19 #include "base/threading/thread_restrictions.h"
19 #include "base/time/time.h" 20 #include "base/time/time.h"
20 #include "build/build_config.h" 21 #include "build/build_config.h"
21 #include "chrome/browser/chrome_notification_types.h" 22 #include "chrome/browser/chrome_notification_types.h"
22 #include "chrome/browser/infobars/infobar_service.h" 23 #include "chrome/browser/infobars/infobar_service.h"
23 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" 24 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
24 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" 25 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h"
25 #include "chrome/browser/profiles/profile.h" 26 #include "chrome/browser/profiles/profile.h"
26 #include "chrome/browser/ui/browser.h" 27 #include "chrome/browser/ui/browser.h"
27 #include "chrome/browser/ui/browser_tabstrip.h" 28 #include "chrome/browser/ui/browser_tabstrip.h"
28 #include "chrome/browser/ui/tabs/tab_strip_model.h" 29 #include "chrome/browser/ui/tabs/tab_strip_model.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 base::ScopedTempDir temp_working_dir_; 338 base::ScopedTempDir temp_working_dir_;
338 }; 339 };
339 340
340 INSTANTIATE_TEST_CASE_P( 341 INSTANTIATE_TEST_CASE_P(
341 WebRtcVideoQualityBrowserTests, 342 WebRtcVideoQualityBrowserTests,
342 WebRtcVideoQualityBrowserTest, 343 WebRtcVideoQualityBrowserTest,
343 testing::ValuesIn(kVideoConfigurations)); 344 testing::ValuesIn(kVideoConfigurations));
344 345
345 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, 346 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
346 MANUAL_TestVideoQualityVp8) { 347 MANUAL_TestVideoQualityVp8) {
348 base::ThreadRestrictions::ScopedAllowIO allow_io;
347 TestVideoQuality("VP8"); 349 TestVideoQuality("VP8");
348 } 350 }
349 351
350 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, 352 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
351 MANUAL_TestVideoQualityVp9) { 353 MANUAL_TestVideoQualityVp9) {
354 base::ThreadRestrictions::ScopedAllowIO allow_io;
352 TestVideoQuality("VP9"); 355 TestVideoQuality("VP9");
353 } 356 }
354 357
355 #if BUILDFLAG(RTC_USE_H264) 358 #if BUILDFLAG(RTC_USE_H264)
356 359
357 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, 360 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
358 MANUAL_TestVideoQualityH264) { 361 MANUAL_TestVideoQualityH264) {
362 base::ThreadRestrictions::ScopedAllowIO allow_io;
359 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. 363 // Only run test if run-time feature corresponding to |rtc_use_h264| is on.
360 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { 364 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) {
361 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " 365 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. "
362 "Skipping WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264 " 366 "Skipping WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264 "
363 "(test \"OK\")"; 367 "(test \"OK\")";
364 return; 368 return;
365 } 369 }
366 TestVideoQuality("H264"); 370 TestVideoQuality("H264");
367 } 371 }
368 372
369 #endif // BUILDFLAG(RTC_USE_H264) 373 #endif // BUILDFLAG(RTC_USE_H264)
OLDNEW
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_stats_perf_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698