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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "content/browser/media/media_browsertest.h" | 6 #include "content/browser/media/media_browsertest.h" |
7 #include "content/public/test/browser_test_utils.h" | 7 #include "content/public/test/browser_test_utils.h" |
8 #include "media/base/test_data_util.h" | 8 #include "media/base/test_data_util.h" |
9 #include "media/media_features.h" | |
10 | 9 |
11 namespace content { | 10 namespace content { |
12 | 11 |
13 class MediaColorTest : public MediaBrowserTest { | 12 class MediaColorTest : public MediaBrowserTest { |
14 public: | 13 public: |
15 void RunColorTest(const std::string& video_file) { | 14 void RunColorTest(const std::string& video_file) { |
16 base::FilePath path = media::GetTestDataFilePath("blackwhite.html"); | 15 base::FilePath path = media::GetTestDataFilePath("blackwhite.html"); |
17 std::string final_title = | 16 std::string final_title = |
18 RunTest(GetFileUrlWithQuery(path, video_file), kEnded); | 17 RunTest(GetFileUrlWithQuery(path, video_file), kEnded); |
19 EXPECT_EQ(kEnded, final_title); | 18 EXPECT_EQ(kEnded, final_title); |
(...skipping 16 matching lines...) Expand all Loading... |
36 #endif // !defined(OS_ANDROID) | 35 #endif // !defined(OS_ANDROID) |
37 | 36 |
38 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pVp8) { | 37 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pVp8) { |
39 RunColorTest("yuv420p.webm"); | 38 RunColorTest("yuv420p.webm"); |
40 } | 39 } |
41 | 40 |
42 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pVp9) { | 41 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pVp9) { |
43 RunColorTest("yuv444p.webm"); | 42 RunColorTest("yuv444p.webm"); |
44 } | 43 } |
45 | 44 |
46 #if BUILDFLAG(USE_PROPRIETARY_CODECS) | 45 #if defined(USE_PROPRIETARY_CODECS) |
47 | 46 |
48 // This fails on some Android devices: http://crbug.com/649199, | 47 // This fails on some Android devices: http://crbug.com/649199, |
49 // http://crbug.com/649185. | 48 // http://crbug.com/649185. |
50 #if defined(OS_ANDROID) | 49 #if defined(OS_ANDROID) |
51 #define MAYBE_Yuv420pH264 DISABLED_Yuv420pH264 | 50 #define MAYBE_Yuv420pH264 DISABLED_Yuv420pH264 |
52 #else | 51 #else |
53 #define MAYBE_Yuv420pH264 Yuv420pH264 | 52 #define MAYBE_Yuv420pH264 Yuv420pH264 |
54 #endif | 53 #endif |
55 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuv420pH264) { | 54 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuv420pH264) { |
56 RunColorTest("yuv420p.mp4"); | 55 RunColorTest("yuv420p.mp4"); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pH264) { | 92 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pH264) { |
94 RunColorTest("yuv444p.mp4"); | 93 RunColorTest("yuv444p.mp4"); |
95 } | 94 } |
96 #endif // !defined(OS_ANDROID) | 95 #endif // !defined(OS_ANDROID) |
97 | 96 |
98 #if defined(OS_CHROMEOS) | 97 #if defined(OS_CHROMEOS) |
99 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pMpeg4) { | 98 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pMpeg4) { |
100 RunColorTest("yuv420p.avi"); | 99 RunColorTest("yuv420p.avi"); |
101 } | 100 } |
102 #endif // defined(OS_CHROMEOS) | 101 #endif // defined(OS_CHROMEOS) |
103 #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) | 102 #endif // defined(USE_PROPRIETARY_CODECS) |
104 | 103 |
105 } // namespace content | 104 } // namespace content |
OLD | NEW |