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

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

Issue 2268283003: media: Add External Clear Key content browser test on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
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
13 #if defined(OS_ANDROID) 14 #if defined(OS_ANDROID)
14 #include "base/android/build_info.h" 15 #include "base/android/build_info.h"
15 #include "media/base/media.h" 16 #include "media/base/media.h"
16 #endif 17 #endif
17 18
18 // Available key systems. 19 // Available key systems.
19 const char kClearKeyKeySystem[] = "org.w3.clearkey"; 20 const char kClearKeyKeySystem[] = "org.w3.clearkey";
21 const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey";
jrummell 2016/08/24 20:36:52 No complaints about unused value if !OS_ANDROID?
xhwang 2016/08/24 23:31:03 Done.
20 22
21 // Supported media types. 23 // Supported media types.
22 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\""; 24 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
23 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\""; 25 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
24 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\""; 26 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\"";
25 27
26 // EME-specific test results and errors. 28 // EME-specific test results and errors.
27 const char kEmeKeyError[] = "KEYERROR"; 29 const char kEmeKeyError[] = "KEYERROR";
28 const char kEmeNotSupportedError[] = "NOTSUPPORTEDERROR"; 30 const char kEmeNotSupportedError[] = "NOTSUPPORTEDERROR";
29 31
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 199
198 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) { 200 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, UnknownKeySystemThrowsException) {
199 RunEncryptedMediaTest(kDefaultEmePlayer, 201 RunEncryptedMediaTest(kDefaultEmePlayer,
200 "bear-a_enc-a.webm", 202 "bear-a_enc-a.webm",
201 kWebMAudioOnly, 203 kWebMAudioOnly,
202 "com.example.foo", 204 "com.example.foo",
203 MSE, 205 MSE,
204 kEmeNotSupportedError); 206 kEmeNotSupportedError);
205 } 207 }
206 208
209 #if defined(OS_ANDROID)
210 // On Android, External Clear Key is supported in shell/ by using mojo CDM
211 // with AesDecryptor running in the GPU process.
212 // On other platforms, External Clear Key is supported in chrome/, so it is
213 // tested in browser_tests.
jrummell 2016/08/24 20:36:53 If this is already supported, why not run it? The
xhwang 2016/08/24 23:31:03 As discussed offline, ECK on desktop is not suppor
214 IN_PROC_BROWSER_TEST_F(EncryptedMediaTest, ExternalClearKeyPlayback) {
215 RunSimpleEncryptedMediaTest("bear-320x240-av_enc-av.webm", kWebMAudioVideo,
jrummell 2016/08/24 20:36:52 The similar ClearKey test checks media::PlatformHa
xhwang 2016/08/24 23:31:03 That check is for opus. I specifically chose a non
jrummell 2016/08/25 00:14:13 I missed that. I just looked for the previous test
216 kExternalClearKeyKeySystem, MSE);
217 }
218 #endif
219
207 } // namespace content 220 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698