OLD | NEW |
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" |
(...skipping 21 matching lines...) Expand all Loading... |
32 #include "content/public/browser/notification_service.h" | 32 #include "content/public/browser/notification_service.h" |
33 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h" | 33 #include "content/public/common/feature_h264_with_openh264_ffmpeg.h" |
34 #include "content/public/common/features.h" | 34 #include "content/public/common/features.h" |
35 #include "content/public/test/browser_test_utils.h" | 35 #include "content/public/test/browser_test_utils.h" |
36 #include "media/base/media_switches.h" | 36 #include "media/base/media_switches.h" |
37 #include "net/test/embedded_test_server/embedded_test_server.h" | 37 #include "net/test/embedded_test_server/embedded_test_server.h" |
38 #include "net/test/python_utils.h" | 38 #include "net/test/python_utils.h" |
39 #include "testing/perf/perf_test.h" | 39 #include "testing/perf/perf_test.h" |
40 #include "ui/gl/gl_switches.h" | 40 #include "ui/gl/gl_switches.h" |
41 | 41 |
| 42 #if defined(OS_MACOSX) |
| 43 #include "base/threading/thread_restrictions.h" |
| 44 #endif // defined(OS_MACOSX) |
| 45 |
42 namespace { | 46 namespace { |
43 std::string MakeLabel(const char* test_name, const std::string& video_codec) { | 47 std::string MakeLabel(const char* test_name, const std::string& video_codec) { |
44 std::string codec_label = video_codec.empty() ? "" : "_" + video_codec; | 48 std::string codec_label = video_codec.empty() ? "" : "_" + video_codec; |
45 return base::StringPrintf("%s%s", test_name, codec_label.c_str()); | 49 return base::StringPrintf("%s%s", test_name, codec_label.c_str()); |
46 } | 50 } |
47 } // namespace | 51 } // namespace |
48 | 52 |
49 static const base::FilePath::CharType kFrameAnalyzerExecutable[] = | 53 static const base::FilePath::CharType kFrameAnalyzerExecutable[] = |
50 #if defined(OS_WIN) | 54 #if defined(OS_WIN) |
51 FILE_PATH_LITERAL("frame_analyzer.exe"); | 55 FILE_PATH_LITERAL("frame_analyzer.exe"); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 base::ScopedTempDir temp_working_dir_; | 341 base::ScopedTempDir temp_working_dir_; |
338 }; | 342 }; |
339 | 343 |
340 INSTANTIATE_TEST_CASE_P( | 344 INSTANTIATE_TEST_CASE_P( |
341 WebRtcVideoQualityBrowserTests, | 345 WebRtcVideoQualityBrowserTests, |
342 WebRtcVideoQualityBrowserTest, | 346 WebRtcVideoQualityBrowserTest, |
343 testing::ValuesIn(kVideoConfigurations)); | 347 testing::ValuesIn(kVideoConfigurations)); |
344 | 348 |
345 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, | 349 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, |
346 MANUAL_TestVideoQualityVp8) { | 350 MANUAL_TestVideoQualityVp8) { |
| 351 // crbug.com/684680 |
| 352 #if defined(OS_MACOSX) |
| 353 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 354 #endif // defined(OS_MACOSX) |
347 TestVideoQuality("VP8"); | 355 TestVideoQuality("VP8"); |
348 } | 356 } |
349 | 357 |
350 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, | 358 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, |
351 MANUAL_TestVideoQualityVp9) { | 359 MANUAL_TestVideoQualityVp9) { |
| 360 // crbug.com/684680 |
| 361 #if defined(OS_MACOSX) |
| 362 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 363 #endif // defined(OS_MACOSX) |
352 TestVideoQuality("VP9"); | 364 TestVideoQuality("VP9"); |
353 } | 365 } |
354 | 366 |
355 #if BUILDFLAG(RTC_USE_H264) | 367 #if BUILDFLAG(RTC_USE_H264) |
356 | 368 |
357 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, | 369 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, |
358 MANUAL_TestVideoQualityH264) { | 370 MANUAL_TestVideoQualityH264) { |
| 371 // crbug.com/684680 |
| 372 #if defined(OS_MACOSX) |
| 373 base::ThreadRestrictions::ScopedAllowIO allow_io; |
| 374 #endif // defined(OS_MACOSX) |
359 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. | 375 // Only run test if run-time feature corresponding to |rtc_use_h264| is on. |
360 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { | 376 if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { |
361 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " | 377 LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " |
362 "Skipping WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264 " | 378 "Skipping WebRtcVideoQualityBrowserTest.MANUAL_TestVideoQualityH264 " |
363 "(test \"OK\")"; | 379 "(test \"OK\")"; |
364 return; | 380 return; |
365 } | 381 } |
366 TestVideoQuality("H264"); | 382 TestVideoQuality("H264"); |
367 } | 383 } |
368 | 384 |
369 #endif // BUILDFLAG(RTC_USE_H264) | 385 #endif // BUILDFLAG(RTC_USE_H264) |
OLD | NEW |