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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "content/browser/media/media_browsertest.h" | 6 #include "content/browser/media/media_browsertest.h" |
7 #include "content/public/common/content_switches.h" | 7 #include "content/public/common/content_switches.h" |
8 #if defined(OS_ANDROID) | 8 #if defined(OS_ANDROID) |
9 #include "base/android/build_info.h" | 9 #include "base/android/build_info.h" |
10 #endif | 10 #endif |
11 | 11 |
12 // Common media types. | 12 // Common media types. |
| 13 #if !defined(THREAD_SANITIZER) |
13 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; | 14 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; |
14 #if !defined(OS_ANDROID) | 15 #if !defined(OS_ANDROID) |
15 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\""; | 16 const char kWebMOpusAudioOnly[] = "audio/webm; codecs=\"opus\""; |
16 #endif | 17 #endif |
17 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; | 18 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; |
18 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; | 19 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; |
| 20 #endif // !defined(THREAD_SANITIZER) |
19 | 21 |
20 namespace content { | 22 namespace content { |
21 | 23 |
22 // MSE is available on all desktop platforms and on Android 4.1 and later. | 24 // MSE is available on all desktop platforms and on Android 4.1 and later. |
23 static bool IsMSESupported() { | 25 static bool IsMSESupported() { |
24 #if defined(OS_ANDROID) | 26 #if defined(OS_ANDROID) |
25 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) { | 27 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) { |
26 VLOG(0) << "MSE is only supported in Android 4.1 and later."; | 28 VLOG(0) << "MSE is only supported in Android 4.1 and later."; |
27 return false; | 29 return false; |
28 } | 30 } |
(...skipping 19 matching lines...) Expand all Loading... |
48 } | 50 } |
49 | 51 |
50 #if defined(OS_ANDROID) | 52 #if defined(OS_ANDROID) |
51 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 53 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
52 command_line->AppendSwitch( | 54 command_line->AppendSwitch( |
53 switches::kDisableGestureRequirementForMediaPlayback); | 55 switches::kDisableGestureRequirementForMediaPlayback); |
54 } | 56 } |
55 #endif | 57 #endif |
56 }; | 58 }; |
57 | 59 |
| 60 // http://crbug.com/407452 |
| 61 #if !defined(THREAD_SANITIZER) |
58 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) { | 62 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoAudio_WebM) { |
59 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded); | 63 TestSimplePlayback("bear-320x240.webm", kWebMAudioVideo, kEnded); |
60 } | 64 } |
61 | 65 |
62 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) { | 66 IN_PROC_BROWSER_TEST_F(MediaSourceTest, Playback_VideoOnly_WebM) { |
63 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded); | 67 TestSimplePlayback("bear-320x240-video-only.webm", kWebMVideoOnly, kEnded); |
64 } | 68 } |
65 | 69 |
66 // Opus is not supported in Android as of now. | 70 // Opus is not supported in Android as of now. |
67 #if !defined(OS_ANDROID) | 71 #if !defined(OS_ANDROID) |
(...skipping 15 matching lines...) Expand all Loading... |
83 IN_PROC_BROWSER_TEST_F(MediaSourceTest, ConfigChangeVideo) { | 87 IN_PROC_BROWSER_TEST_F(MediaSourceTest, ConfigChangeVideo) { |
84 if (!IsMSESupported()) { | 88 if (!IsMSESupported()) { |
85 VLOG(0) << "Skipping test - MSE not supported."; | 89 VLOG(0) << "Skipping test - MSE not supported."; |
86 return; | 90 return; |
87 } | 91 } |
88 RunMediaTestPage("mse_config_change.html", | 92 RunMediaTestPage("mse_config_change.html", |
89 media::QueryParams(), | 93 media::QueryParams(), |
90 kEnded, | 94 kEnded, |
91 true); | 95 true); |
92 } | 96 } |
| 97 #endif // !defined(THREAD_SANITIZER) |
93 | 98 |
94 } // namespace content | 99 } // namespace content |
OLD | NEW |