OLD | NEW |
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/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/test/browser_test_utils.h" | 10 #include "content/public/test/browser_test_utils.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 std::string expected; | 103 std::string expected; |
104 expected += base::IntToString(width); | 104 expected += base::IntToString(width); |
105 expected += " "; | 105 expected += " "; |
106 expected += base::IntToString(height); | 106 expected += base::IntToString(height); |
107 media::QueryParams query_params; | 107 media::QueryParams query_params; |
108 query_params.push_back(std::make_pair("video", media_file)); | 108 query_params.push_back(std::make_pair("video", media_file)); |
109 RunMediaTestPage("player.html", query_params, expected, false); | 109 RunMediaTestPage("player.html", query_params, expected, false); |
110 } | 110 } |
111 }; | 111 }; |
112 | 112 |
| 113 // http://crbug.com/407452 |
| 114 #if !defined(THREAD_SANITIZER) |
113 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearTheora) { | 115 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearTheora) { |
114 PlayVideo("bear.ogv", GetParam()); | 116 PlayVideo("bear.ogv", GetParam()); |
115 } | 117 } |
116 | 118 |
117 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentTheora) { | 119 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearSilentTheora) { |
118 PlayVideo("bear_silent.ogv", GetParam()); | 120 PlayVideo("bear_silent.ogv", GetParam()); |
119 } | 121 } |
120 | 122 |
121 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearWebm) { | 123 IN_PROC_BROWSER_TEST_P(MediaTest, VideoBearWebm) { |
122 PlayVideo("bear.webm", GetParam()); | 124 PlayVideo("bear.webm", GetParam()); |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 IN_PROC_BROWSER_TEST_P(MediaTest, VideoTulipWebm) { | 229 IN_PROC_BROWSER_TEST_P(MediaTest, VideoTulipWebm) { |
228 PlayVideo("tulip2.webm", GetParam()); | 230 PlayVideo("tulip2.webm", GetParam()); |
229 } | 231 } |
230 | 232 |
231 // Covers tear-down when navigating away as opposed to browser exiting. | 233 // Covers tear-down when navigating away as opposed to browser exiting. |
232 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) { | 234 IN_PROC_BROWSER_TEST_F(MediaTest, Navigate) { |
233 PlayVideo("bear.ogv", false); | 235 PlayVideo("bear.ogv", false); |
234 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); | 236 NavigateToURL(shell(), GURL(url::kAboutBlankURL)); |
235 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); | 237 EXPECT_FALSE(shell()->web_contents()->IsCrashed()); |
236 } | 238 } |
| 239 #endif // !defined(THREAD_SANITIZER) |
237 | 240 |
238 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false)); | 241 INSTANTIATE_TEST_CASE_P(File, MediaTest, ::testing::Values(false)); |
239 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); | 242 INSTANTIATE_TEST_CASE_P(Http, MediaTest, ::testing::Values(true)); |
240 | 243 |
| 244 // http://crbug.com/407452 |
| 245 #if !defined(THREAD_SANITIZER) |
241 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv420pTheora)) { | 246 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv420pTheora)) { |
242 RunColorFormatTest("yuv420p.ogv", kEnded); | 247 RunColorFormatTest("yuv420p.ogv", kEnded); |
243 } | 248 } |
244 | 249 |
245 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv422pTheora)) { | 250 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv422pTheora)) { |
246 RunColorFormatTest("yuv422p.ogv", kEnded); | 251 RunColorFormatTest("yuv422p.ogv", kEnded); |
247 } | 252 } |
248 | 253 |
249 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv444pTheora)) { | 254 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv444pTheora)) { |
250 RunColorFormatTest("yuv444p.ogv", kEnded); | 255 RunColorFormatTest("yuv444p.ogv", kEnded); |
251 } | 256 } |
252 | 257 |
253 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv420pVp8)) { | 258 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv420pVp8)) { |
254 RunColorFormatTest("yuv420p.webm", kEnded); | 259 RunColorFormatTest("yuv420p.webm", kEnded); |
255 } | 260 } |
256 | 261 |
257 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv444pVp9)) { | 262 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv444pVp9)) { |
258 RunColorFormatTest("yuv444p.webm", "ENDED"); | 263 RunColorFormatTest("yuv444p.webm", "ENDED"); |
259 } | 264 } |
260 | 265 |
| 266 #endif // !defined(THREAD_SANITIZER) |
| 267 |
261 #if defined(USE_PROPRIETARY_CODECS) | 268 #if defined(USE_PROPRIETARY_CODECS) |
262 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv420pH264)) { | 269 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv420pH264)) { |
263 RunColorFormatTest("yuv420p.mp4", kEnded); | 270 RunColorFormatTest("yuv420p.mp4", kEnded); |
264 } | 271 } |
265 | 272 |
266 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuvj420pH264)) { | 273 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuvj420pH264)) { |
267 RunColorFormatTest("yuvj420p.mp4", kEnded); | 274 RunColorFormatTest("yuvj420p.mp4", kEnded); |
268 } | 275 } |
269 | 276 |
270 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv422pH264)) { | 277 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv422pH264)) { |
271 RunColorFormatTest("yuv422p.mp4", kEnded); | 278 RunColorFormatTest("yuv422p.mp4", kEnded); |
272 } | 279 } |
273 | 280 |
274 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv444pH264)) { | 281 IN_PROC_BROWSER_TEST_F(MediaTest, MAYBE(Yuv444pH264)) { |
275 RunColorFormatTest("yuv444p.mp4", kEnded); | 282 RunColorFormatTest("yuv444p.mp4", kEnded); |
276 } | 283 } |
277 | 284 |
278 #if defined(OS_CHROMEOS) | 285 #if defined(OS_CHROMEOS) |
279 IN_PROC_BROWSER_TEST_F(MediaTest, Yuv420pMpeg4) { | 286 IN_PROC_BROWSER_TEST_F(MediaTest, Yuv420pMpeg4) { |
280 RunColorFormatTest("yuv420p.avi", kEnded); | 287 RunColorFormatTest("yuv420p.avi", kEnded); |
281 } | 288 } |
282 #endif // defined(OS_CHROMEOS) | 289 #endif // defined(OS_CHROMEOS) |
283 #endif // defined(USE_PROPRIETARY_CODECS) | 290 #endif // defined(USE_PROPRIETARY_CODECS) |
284 | 291 |
285 } // namespace content | 292 } // namespace content |
OLD | NEW |