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

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

Issue 2356383002: Revert of Enable media browsertests on Android (Closed)
Patch Set: Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "content/browser/media/media_browsertest.h" 5 #include "content/browser/media/media_browsertest.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 std::string expected; 94 std::string expected;
95 expected += base::IntToString(width); 95 expected += base::IntToString(width);
96 expected += " "; 96 expected += " ";
97 expected += base::IntToString(height); 97 expected += base::IntToString(height);
98 base::StringPairs query_params; 98 base::StringPairs query_params;
99 query_params.push_back(std::make_pair("video", media_file)); 99 query_params.push_back(std::make_pair("video", media_file));
100 RunMediaTestPage("player.html", query_params, expected, false); 100 RunMediaTestPage("player.html", query_params, expected, false);
101 } 101 }
102 }; 102 };
103 103
104 // Android doesn't support Theora.
105 #if !defined(OS_ANDROID)
106 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearTheora) { 104 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearTheora) {
107 PlayVideo("bear.ogv", GetParam()); 105 PlayVideo("bear.ogv", GetParam());
108 } 106 }
109 107
110 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentTheora) { 108 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentTheora) {
111 PlayVideo("bear_silent.ogv", GetParam()); 109 PlayVideo("bear_silent.ogv", GetParam());
112 } 110 }
113 #endif // !defined(OS_ANDROID)
114 111
115 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearWebm) { 112 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearWebm) {
116 PlayVideo("bear.webm", GetParam()); 113 PlayVideo("bear.webm", GetParam());
117 } 114 }
118 115
119 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearOpusWebm) { 116 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearOpusWebm) {
120 PlayVideo("bear-opus.webm", GetParam()); 117 PlayVideo("bear-opus.webm", GetParam());
121 } 118 }
122 119
123 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearOpusOgg) { 120 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearOpusOgg) {
124 PlayVideo("bear-opus.ogg", GetParam()); 121 PlayVideo("bear-opus.ogg", GetParam());
125 } 122 }
126 123
127 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentWebm) { 124 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentWebm) {
128 PlayVideo("bear_silent.webm", GetParam()); 125 PlayVideo("bear_silent.webm", GetParam());
129 } 126 }
130 127
131 #if defined(USE_PROPRIETARY_CODECS) 128 #if defined(USE_PROPRIETARY_CODECS)
132 // Crashes on Mac only. http://crbug.com/621857 129 // Crashes on Mac only. http://crbug.com/621857
133 #if defined(OS_MACOSX) 130 #if defined(OS_MACOSX)
134 #define MAYBE_VideoBearMp4 DISABLED_VideoBearMp4 131 #define MAYBE_VideoBearMp4 DISABLED_VideoBearMp4
135 #else 132 #else
136 #define MAYBE_VideoBearMp4 VideoBearMp4 133 #define MAYBE_VideoBearMp4 VideoBearMp4
137 #endif 134 #endif
138 IN_PROC_BROWSER_TEST_P(MediaTest, MAYBE_VideoBearMp4) { 135 IN_PROC_BROWSER_TEST_P(MediaTest, MAYBE_VideoBearMp4) {
139 PlayVideo("bear.mp4", GetParam()); 136 PlayVideo("bear.mp4", GetParam());
140 } 137 }
141 138
142 // Android devices usually only support baseline, main and high.
143 #if !defined(OS_ANDROID)
144 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearHighBitDepthMp4) { 139 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearHighBitDepthMp4) {
145 PlayVideo("bear-320x180-hi10p.mp4", GetParam()); 140 PlayVideo("bear-320x180-hi10p.mp4", GetParam());
146 } 141 }
147 #endif // !defined(OS_ANDROID)
148 142
149 // Crashes on Mac only. http://crbug.com/621857 143 // Crashes on Mac only. http://crbug.com/621857
150 #if defined(OS_MACOSX) 144 #if defined(OS_MACOSX)
151 #define MAYBE_VideoBearSilentMp4 DISABLED_VideoBearSilentMp4 145 #define MAYBE_VideoBearSilentMp4 DISABLED_VideoBearSilentMp4
152 #else 146 #else
153 #define MAYBE_VideoBearSilentMp4 VideoBearSilentMp4 147 #define MAYBE_VideoBearSilentMp4 VideoBearSilentMp4
154 #endif 148 #endif
155 IN_PROC_BROWSER_TEST_P(MediaTest, MAYBE_VideoBearSilentMp4) { 149 IN_PROC_BROWSER_TEST_P(MediaTest, MAYBE_VideoBearSilentMp4) {
156 PlayVideo("bear_silent.mp4", GetParam()); 150 PlayVideo("bear_silent.mp4", GetParam());
157 } 151 }
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearWavPcm192kHz) { 230 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearWavPcm192kHz) {
237 PlayAudio("bear_192kHz.wav", GetParam()); 231 PlayAudio("bear_192kHz.wav", GetParam());
238 } 232 }
239 233
240 IN_PROC_BROWSER_TEST_P(MediaTest, VideoTulipWebm) { 234 IN_PROC_BROWSER_TEST_P(MediaTest, VideoTulipWebm) {
241 PlayVideo("tulip2.webm", GetParam()); 235 PlayVideo("tulip2.webm", GetParam());
242 } 236 }
243 237
244 // Covers tear-down when navigating away as opposed to browser exiting. 238 // Covers tear-down when navigating away as opposed to browser exiting.
245 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) { 239 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) {
246 PlayVideo("bear.webm", false); 240 PlayVideo("bear.ogv", false);
247 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); 241 NavigateToURL(shell(), GURL(url::kAboutBlankURL));
248 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); 242 EXPECT_FALSE(shell()->web_contents()->IsCrashed());
249 } 243 }
250 244
251 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false)); 245 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false));
252 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); 246 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true));
253 247
254 } // namespace content 248 } // namespace content
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/filter/content_browsertests_disabled ('k') | content/browser/media/media_color_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698