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

Side by Side Diff: content/browser/media/media_color_browsertest.cc

Issue 2365463003: Reland: Enable media browsertests on Android (Closed)
Patch Set: Created 4 years, 3 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 | « content/browser/media/media_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 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 9
10 namespace content { 10 namespace content {
11 11
12 class MediaColorTest : public MediaBrowserTest { 12 class MediaColorTest : public MediaBrowserTest {
13 public: 13 public:
14 void RunColorTest(const std::string& video_file) { 14 void RunColorTest(const std::string& video_file) {
15 base::FilePath path = media::GetTestDataFilePath("blackwhite.html"); 15 base::FilePath path = media::GetTestDataFilePath("blackwhite.html");
16 std::string final_title = 16 std::string final_title =
17 RunTest(GetFileUrlWithQuery(path, video_file), kEnded); 17 RunTest(GetFileUrlWithQuery(path, video_file), kEnded);
18 EXPECT_EQ(kEnded, final_title); 18 EXPECT_EQ(kEnded, final_title);
19 } 19 }
20 }; 20 };
21 21
22 // Android doesn't support Theora.
23 #if !defined(OS_ANDROID)
22 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pTheora) { 24 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pTheora) {
23 RunColorTest("yuv420p.ogv"); 25 RunColorTest("yuv420p.ogv");
24 } 26 }
25 27
26 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv422pTheora) { 28 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv422pTheora) {
27 RunColorTest("yuv422p.ogv"); 29 RunColorTest("yuv422p.ogv");
28 } 30 }
29 31
30 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pTheora) { 32 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pTheora) {
31 RunColorTest("yuv444p.ogv"); 33 RunColorTest("yuv444p.ogv");
32 } 34 }
35 #endif // !defined(OS_ANDROID)
33 36
34 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pVp8) { 37 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pVp8) {
35 RunColorTest("yuv420p.webm"); 38 RunColorTest("yuv420p.webm");
36 } 39 }
37 40
38 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pVp9) { 41 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pVp9) {
39 RunColorTest("yuv444p.webm"); 42 RunColorTest("yuv444p.webm");
40 } 43 }
41 44
42 #if defined(USE_PROPRIETARY_CODECS) 45 #if defined(USE_PROPRIETARY_CODECS)
43 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pH264) { 46
47 // This fails on some Android devices: http://crbug.com/649199,
48 // http://crbug.com/649185.
49 #if defined(OS_ANDROID)
50 #define MAYBE_Yuv420pH264 DISABLED_Yuv420pH264
51 #else
52 #define MAYBE_Yuv420pH264 Yuv420pH264
53 #endif
54 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuv420pH264) {
44 RunColorTest("yuv420p.mp4"); 55 RunColorTest("yuv420p.mp4");
45 } 56 }
46 57
47 // This test fails on Android http://crbug.com/647818, and OSX 58 // This test fails on Android: http://crbug.com/647818, and OSX:
48 // http://crbug.com/647838. 59 // http://crbug.com/647838.
49 #if defined(OS_MACOSX) || defined(OS_ANDROID) 60 #if defined(OS_MACOSX) || defined(OS_ANDROID)
50 #define MAYBE_Yuvj420pH264 DISABLED_Yuvj420pH264 61 #define MAYBE_Yuvj420pH264 DISABLED_Yuvj420pH264
51 #else 62 #else
52 #define MAYBE_Yuvj420pH264 Yuvj420pH264 63 #define MAYBE_Yuvj420pH264 Yuvj420pH264
53 #endif 64 #endif
54 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuvj420pH264) { 65 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuvj420pH264) {
55 RunColorTest("yuvj420p.mp4"); 66 RunColorTest("yuvj420p.mp4");
56 } 67 }
57 68
58 // This fails on Linux & ChromeOS http://crbug.com/647400, and Windows 69 // This fails on Linux & ChromeOS: http://crbug.com/647400,
59 // http://crbug.com/647842. 70 // Windows: http://crbug.com/647842, and Android: http://crbug.com/649199,
60 #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) 71 // http://crbug.com/649185.
72 #if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_WIN) || \
73 defined(OS_ANDROID)
61 #define MAYBE_Yuv420pRec709H264 DISABLED_Yuv420pRec709H264 74 #define MAYBE_Yuv420pRec709H264 DISABLED_Yuv420pRec709H264
62 #else 75 #else
63 #define MAYBE_Yuv420pRec709H264 Yuv420pRec709H264 76 #define MAYBE_Yuv420pRec709H264 Yuv420pRec709H264
64 #endif 77 #endif
65 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuv420pRec709H264) { 78 IN_PROC_BROWSER_TEST_F(MediaColorTest, MAYBE_Yuv420pRec709H264) {
66 RunColorTest("yuv420p_rec709.mp4"); 79 RunColorTest("yuv420p_rec709.mp4");
67 } 80 }
68 81
82 // Android devices usually only support baseline, main and high.
83 #if !defined(OS_ANDROID)
69 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pHighBitDepth) { 84 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pHighBitDepth) {
70 RunColorTest("yuv420p_hi10p.mp4"); 85 RunColorTest("yuv420p_hi10p.mp4");
71 } 86 }
72 87
73 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv422pH264) { 88 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv422pH264) {
74 RunColorTest("yuv422p.mp4"); 89 RunColorTest("yuv422p.mp4");
75 } 90 }
76 91
77 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pH264) { 92 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pH264) {
78 RunColorTest("yuv444p.mp4"); 93 RunColorTest("yuv444p.mp4");
79 } 94 }
95 #endif // !defined(OS_ANDROID)
80 96
81 #if defined(OS_CHROMEOS) 97 #if defined(OS_CHROMEOS)
82 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pMpeg4) { 98 IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pMpeg4) {
83 RunColorTest("yuv420p.avi"); 99 RunColorTest("yuv420p.avi");
84 } 100 }
85 #endif // defined(OS_CHROMEOS) 101 #endif // defined(OS_CHROMEOS)
86 #endif // defined(USE_PROPRIETARY_CODECS) 102 #endif // defined(USE_PROPRIETARY_CODECS)
87 103
88 } // namespace content 104 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698