| 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/environment.h" | 6 #include "base/environment.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
| 9 #include "base/process/launch.h" | 9 #include "base/process/launch.h" |
| 10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 #include "chrome/test/base/ui_test_utils.h" | 25 #include "chrome/test/base/ui_test_utils.h" |
| 26 #include "components/infobars/core/infobar.h" | 26 #include "components/infobars/core/infobar.h" |
| 27 #include "content/public/browser/notification_service.h" | 27 #include "content/public/browser/notification_service.h" |
| 28 #include "content/public/test/browser_test_utils.h" | 28 #include "content/public/test/browser_test_utils.h" |
| 29 #include "media/base/media_switches.h" | 29 #include "media/base/media_switches.h" |
| 30 #include "net/test/embedded_test_server/embedded_test_server.h" | 30 #include "net/test/embedded_test_server/embedded_test_server.h" |
| 31 #include "net/test/python_utils.h" | 31 #include "net/test/python_utils.h" |
| 32 #include "testing/perf/perf_test.h" | 32 #include "testing/perf/perf_test.h" |
| 33 #include "ui/gl/gl_switches.h" | 33 #include "ui/gl/gl_switches.h" |
| 34 | 34 |
| 35 // For fine-grained suppression on flaky tests. | |
| 36 #if defined(OS_WIN) | |
| 37 #include "base/win/windows_version.h" | |
| 38 #endif | |
| 39 | |
| 40 static const base::FilePath::CharType kFrameAnalyzerExecutable[] = | 35 static const base::FilePath::CharType kFrameAnalyzerExecutable[] = |
| 41 #if defined(OS_WIN) | 36 #if defined(OS_WIN) |
| 42 FILE_PATH_LITERAL("frame_analyzer.exe"); | 37 FILE_PATH_LITERAL("frame_analyzer.exe"); |
| 43 #else | 38 #else |
| 44 FILE_PATH_LITERAL("frame_analyzer"); | 39 FILE_PATH_LITERAL("frame_analyzer"); |
| 45 #endif | 40 #endif |
| 46 | 41 |
| 47 static const base::FilePath::CharType kArgbToI420ConverterExecutable[] = | 42 static const base::FilePath::CharType kArgbToI420ConverterExecutable[] = |
| 48 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
| 49 FILE_PATH_LITERAL("rgba_to_i420_converter.exe"); | 44 FILE_PATH_LITERAL("rgba_to_i420_converter.exe"); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 base::FilePath webrtc_reference_video_y4m_; | 308 base::FilePath webrtc_reference_video_y4m_; |
| 314 }; | 309 }; |
| 315 | 310 |
| 316 INSTANTIATE_TEST_CASE_P( | 311 INSTANTIATE_TEST_CASE_P( |
| 317 WebRtcVideoQualityBrowserTests, | 312 WebRtcVideoQualityBrowserTests, |
| 318 WebRtcVideoQualityBrowserTest, | 313 WebRtcVideoQualityBrowserTest, |
| 319 testing::ValuesIn(kVideoConfigurations)); | 314 testing::ValuesIn(kVideoConfigurations)); |
| 320 | 315 |
| 321 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, | 316 IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, |
| 322 MANUAL_TestVideoQuality) { | 317 MANUAL_TestVideoQuality) { |
| 323 | 318 if (OnWinXp()) |
| 324 #if defined(OS_WIN) | 319 return; // Fails on XP. http://crbug.com/353078. |
| 325 // Fails on XP. http://crbug.com/353078 | |
| 326 if (base::win::GetVersion() <= base::win::VERSION_XP) | |
| 327 return; | |
| 328 #endif | |
| 329 | 320 |
| 330 ASSERT_GE(TestTimeouts::action_max_timeout().InSeconds(), 150) << | 321 ASSERT_GE(TestTimeouts::action_max_timeout().InSeconds(), 150) << |
| 331 "This is a long-running test; you must specify " | 322 "This is a long-running test; you must specify " |
| 332 "--ui-test-action-max-timeout to have a value of at least 150000."; | 323 "--ui-test-action-max-timeout to have a value of at least 150000."; |
| 333 ASSERT_TRUE(HasAllRequiredResources()); | 324 ASSERT_TRUE(HasAllRequiredResources()); |
| 334 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 325 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 335 ASSERT_TRUE(StartPyWebSocketServer()); | 326 ASSERT_TRUE(StartPyWebSocketServer()); |
| 336 | 327 |
| 337 content::WebContents* left_tab = | 328 content::WebContents* left_tab = |
| 338 OpenPageAndGetUserMediaInNewTabWithConstraints( | 329 OpenPageAndGetUserMediaInNewTabWithConstraints( |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 ASSERT_TRUE(CompareVideosAndPrintResult( | 367 ASSERT_TRUE(CompareVideosAndPrintResult( |
| 377 test_config_.test_name, | 368 test_config_.test_name, |
| 378 test_config_.width, | 369 test_config_.width, |
| 379 test_config_.height, | 370 test_config_.height, |
| 380 GetWorkingDir().Append(kCapturedYuvFileName), | 371 GetWorkingDir().Append(kCapturedYuvFileName), |
| 381 test::GetReferenceFilesDir() | 372 test::GetReferenceFilesDir() |
| 382 .Append(test_config_.reference_video) | 373 .Append(test_config_.reference_video) |
| 383 .AddExtension(test::kYuvFileExtension), | 374 .AddExtension(test::kYuvFileExtension), |
| 384 GetWorkingDir().Append(kStatsFileName))); | 375 GetWorkingDir().Append(kStatsFileName))); |
| 385 } | 376 } |
| OLD | NEW |