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

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

Issue 1846743002: media: Enable Opus tests on Android in content EncryptedMediaTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase only Created 4 years, 8 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 | « no previous file | 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 (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 "base/strings/utf_string_conversions.h" 6 #include "base/strings/utf_string_conversions.h"
7 #include "base/win/windows_version.h" 7 #include "base/win/windows_version.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "content/browser/media/media_browsertest.h" 9 #include "content/browser/media/media_browsertest.h"
10 #include "content/public/common/content_switches.h" 10 #include "content/public/common/content_switches.h"
11 #include "content/public/test/browser_test_utils.h" 11 #include "content/public/test/browser_test_utils.h"
12 #include "content/shell/browser/shell.h" 12 #include "content/shell/browser/shell.h"
13 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
14 #include "base/android/build_info.h" 14 #include "base/android/build_info.h"
15 #include "media/base/media.h"
15 #endif 16 #endif
16 17
17 // Available key systems. 18 // Available key systems.
18 const char kClearKeyKeySystem[] = "org.w3.clearkey"; 19 const char kClearKeyKeySystem[] = "org.w3.clearkey";
19 20
20 // Supported media types. 21 // Supported media types.
21 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; 22 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
22 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; 23 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
23 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; 24 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\"";
24 25
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 160
160 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_WebM) { 161 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_WebM) {
161 TestSimplePlayback("bear-320x240-v_enc-v.webm", kWebMVideoOnly); 162 TestSimplePlayback("bear-320x240-v_enc-v.webm", kWebMVideoOnly);
162 } 163 }
163 164
164 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM) { 165 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM) {
165 TestSimplePlayback("bear-320x240-av_enc-v.webm", kWebMAudioVideo); 166 TestSimplePlayback("bear-320x240-av_enc-v.webm", kWebMAudioVideo);
166 } 167 }
167 168
168 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM_Opus) { 169 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM_Opus) {
169 // Opus is not supported on Android. http://crbug.com/318436
170 #if defined(OS_ANDROID) 170 #if defined(OS_ANDROID)
171 return; 171 if (!media::PlatformHasOpusSupport())
172 return;
172 #endif 173 #endif
173 TestSimplePlayback("bear-320x240-opus-a_enc-a.webm", kWebMAudioOnly); 174 TestSimplePlayback("bear-320x240-opus-a_enc-a.webm", kWebMAudioOnly);
174 } 175 }
175 176
176 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM_Opus) { 177 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM_Opus) {
177 // Opus is not supported on Android. http://crbug.com/318436
178 #if defined(OS_ANDROID) 178 #if defined(OS_ANDROID)
179 return; 179 if (!media::PlatformHasOpusSupport())
180 return;
180 #endif 181 #endif
181 TestSimplePlayback("bear-320x240-opus-av_enc-av.webm", kWebMAudioVideo); 182 TestSimplePlayback("bear-320x240-opus-av_enc-av.webm", kWebMAudioVideo);
182 } 183 }
183 184
184 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM_Opus) { 185 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM_Opus) {
185 // Opus is not supported on Android. http://crbug.com/318436
186 #if defined(OS_ANDROID) 186 #if defined(OS_ANDROID)
187 return; 187 if (!media::PlatformHasOpusSupport())
188 return;
188 #endif 189 #endif
189 TestSimplePlayback("bear-320x240-opus-av_enc-v.webm", kWebMAudioVideo); 190 TestSimplePlayback("bear-320x240-opus-av_enc-v.webm", kWebMAudioVideo);
190 } 191 }
191 192
192 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, ConfigChangeVideo) { 193 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, ConfigChangeVideo) {
193 TestConfigChange(); 194 TestConfigChange();
194 } 195 }
195 196
196 // Playback of this video on Android w/ Spitzer enabled causes glitches. See 197 // Playback of this video on Android w/ Spitzer enabled causes glitches. See
197 // http://crbug.com/598963. 198 // http://crbug.com/598963.
198 #if !defined(OS_ANDROID) 199 #if !defined(OS_ANDROID)
199 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameSizeChangeVideo) { 200 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameSizeChangeVideo) {
200 TestFrameSizeChange(); 201 TestFrameSizeChange();
201 } 202 }
202 #endif 203 #endif
203 204
204 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { 205 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) {
205 RunEncryptedMediaTest(kDefaultEmePlayer, 206 RunEncryptedMediaTest(kDefaultEmePlayer,
206 "bear-a_enc-a.webm", 207 "bear-a_enc-a.webm",
207 kWebMAudioOnly, 208 kWebMAudioOnly,
208 "com.example.foo", 209 "com.example.foo",
209 MSE, 210 MSE,
210 kEmeNotSupportedError); 211 kEmeNotSupportedError);
211 } 212 }
212 213
213 } // namespace content 214 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698