1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/command_line.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "base/path_service.h"
8 #include "base/strings/utf_string_conversions.h"
9 #include "base/win/windows_version.h"
10 #include "chrome/browser/media/media_browsertest.h"
11 #include "chrome/browser/media/test_license_server.h"
12 #include "chrome/browser/media/wv_test_license_server_config.h"
13 #include "chrome/browser/ui/browser.h"
14 #include "chrome/browser/ui/tabs/tab_strip_model.h"
15 #include "chrome/common/chrome_switches.h"
16 #include "content/public/test/browser_test_utils.h"
17 #include "testing/gtest/include/gtest/gtest-spi.h"
18 #if defined(OS_ANDROID)
19 #include "base/android/build_info.h"
22 #include "widevine_cdm_version.h" // In SHARED_INTERMEDIATE_DIR.
24 #if defined(ENABLE_PEPPER_CDMS)
25 // Platform-specific filename relative to the chrome executable.
26 const char kClearKeyCdmAdapterFileName[] =
27 #if defined(OS_MACOSX)
28 "clearkeycdmadapter.plugin";
30 "clearkeycdmadapter.dll";
31 #elif defined(OS_POSIX)
32 "libclearkeycdmadapter.so";
35 const char kClearKeyCdmPluginMimeType[] = "application/x-ppapi-clearkey-cdm";
36 #endif // defined(ENABLE_PEPPER_CDMS)
38 // Available key systems.
39 const char kClearKeyKeySystem[] = "org.w3.clearkey";
40 const char kPrefixedClearKeyKeySystem[] = "webkit-org.w3.clearkey";
41 const char kExternalClearKeyKeySystem[] = "org.chromium.externalclearkey";
42 const char kExternalClearKeyDecryptOnlyKeySystem[] =
43 "org.chromium.externalclearkey.decryptonly";
44 const char kExternalClearKeyFileIOTestKeySystem[] =
45 "org.chromium.externalclearkey.fileiotest";
46 const char kExternalClearKeyInitializeFailKeySystem[] =
47 "org.chromium.externalclearkey.initializefail";
48 const char kExternalClearKeyCrashKeySystem[] =
49 "org.chromium.externalclearkey.crash";
51 // Supported media types.
52 const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
53 const char kWebMVideoOnly[] = "video/webm; codecs=\"vp8\"";
54 const char kWebMVP9VideoOnly[] = "video/webm; codecs=\"vp9\"";
55 const char kWebMAudioVideo[] = "video/webm; codecs=\"vorbis, vp8\"";
56 #if defined(USE_PROPRIETARY_CODECS)
57 const char kMP4AudioOnly[] = "audio/mp4; codecs=\"mp4a.40.2\"";
58 const char kMP4VideoOnly[] = "video/mp4; codecs=\"avc1.4D4041\"";
59 #endif // defined(USE_PROPRIETARY_CODECS)
62 const char kNoSessionToLoad[] = "";
63 const char kLoadableSession[] = "LoadableSession";
64 const char kUnknownSession[] = "UnknownSession";
66 // EME-specific test results and errors.
67 const char kEmeKeyError[] = "KEYERROR";
68 const char kEmeNotSupportedError[] = "NOTSUPPORTEDERROR";
69 const char kFileIOTestSuccess[] = "FILEIOTESTSUCCESS";
71 // The type of video src used to load media.
77 // Whether to use prefixed or unprefixed EME.
83 // MSE is available on all desktop platforms and on Android 4.1 and later.
84 static bool IsMSESupported() {
85 #if defined(OS_ANDROID)
86 if (base::android::BuildInfo::GetInstance()->sdk_int() < 16) {
87 VLOG(0) << "MSE is only supported in Android 4.1 and later.";
90 #endif // defined(OS_ANDROID)
94 static bool IsParentKeySystemOf(const std::string& parent_key_system,
95 const std::string& key_system) {
96 std::string prefix = parent_key_system + '.';
97 return key_system.substr(0, prefix.size()) == prefix;
100 // Base class for encrypted media tests.
101 class EncryptedMediaTestBase : public MediaBrowserTest {
103 EncryptedMediaTestBase() : is_pepper_cdm_registered_(false) {}
105 bool IsExternalClearKey(const std::string& key_system) {
106 return key_system == kExternalClearKeyKeySystem ||
107 IsParentKeySystemOf(kExternalClearKeyKeySystem, key_system);
110 #if defined(WIDEVINE_CDM_AVAILABLE)
111 bool IsWidevine(const std::string& key_system) {
112 return key_system == kWidevineKeySystem;
114 #endif // defined(WIDEVINE_CDM_AVAILABLE)
116 void RunEncryptedMediaTestPage(const std::string& html_page,
117 const std::string& key_system,
118 std::vector<StringPair>* query_params,
119 const std::string& expected_title) {
120 StartLicenseServerIfNeeded(key_system, query_params);
121 RunMediaTestPage(html_page, query_params, expected_title, true);
124 // Tests |html_page| using |media_file| (with |media_type|) and |key_system|.
125 // When |session_to_load| is not empty, the test will try to load
126 // |session_to_load| with stored keys, instead of creating a new session
127 // and trying to update it with licenses.
128 // When |force_invalid_response| is true, the test will provide invalid
129 // responses, which should trigger errors.
130 // TODO(xhwang): Find an easier way to pass multiple configuration test
132 void RunEncryptedMediaTest(const std::string& html_page,
133 const std::string& media_file,
134 const std::string& media_type,
135 const std::string& key_system,
137 EmeVersion eme_version,
138 const std::string& session_to_load,
139 bool force_invalid_response,
140 const std::string& expected_title) {
141 if (src_type == MSE && !IsMSESupported()) {
142 VLOG(0) << "Skipping test - MSE not supported.";
145 std::vector<StringPair> query_params;
146 query_params.push_back(std::make_pair("mediaFile", media_file));
147 query_params.push_back(std::make_pair("mediaType", media_type));
148 query_params.push_back(std::make_pair("keySystem", key_system));
150 query_params.push_back(std::make_pair("useMSE", "1"));
151 if (eme_version == PREFIXED)
152 query_params.push_back(std::make_pair("usePrefixedEME", "1"));
153 if (force_invalid_response)
154 query_params.push_back(std::make_pair("forceInvalidResponse", "1"));
155 if (!session_to_load.empty())
156 query_params.push_back(std::make_pair("sessionToLoad", session_to_load));
157 RunEncryptedMediaTestPage(html_page, key_system, &query_params,
161 void RunSimpleEncryptedMediaTest(const std::string& media_file,
162 const std::string& media_type,
163 const std::string& key_system,
165 EmeVersion eme_version) {
166 std::string expected_title = kEnded;
167 if (!IsPlayBackPossible(key_system))
168 expected_title = kEmeKeyError;
170 RunEncryptedMediaTest("encrypted_media_player.html",
179 // Check KeyMessage received for all key systems.
180 bool receivedKeyMessage = false;
181 EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
182 browser()->tab_strip_model()->GetActiveWebContents(),
183 "window.domAutomationController.send(video.receivedKeyMessage);",
184 &receivedKeyMessage));
185 EXPECT_TRUE(receivedKeyMessage);
189 void StartLicenseServerIfNeeded(const std::string& key_system,
190 std::vector<StringPair>* query_params) {
191 scoped_ptr<TestLicenseServerConfig> config = GetServerConfig(key_system);
194 license_server_.reset(new TestLicenseServer(config.Pass()));
195 EXPECT_TRUE(license_server_->Start());
196 query_params->push_back(std::make_pair("licenseServerURL",
197 license_server_->GetServerURL()));
200 bool IsPlayBackPossible(const std::string& key_system) {
201 #if defined(WIDEVINE_CDM_AVAILABLE)
202 if (IsWidevine(key_system) && !GetServerConfig(key_system))
204 #endif // defined(WIDEVINE_CDM_AVAILABLE)
208 scoped_ptr<TestLicenseServerConfig> GetServerConfig(
209 const std::string& key_system) {
210 #if defined(WIDEVINE_CDM_AVAILABLE)
211 if (IsWidevine(key_system)) {
212 scoped_ptr<TestLicenseServerConfig> config =
213 scoped_ptr<TestLicenseServerConfig>(new WVTestLicenseServerConfig());
214 if (config->IsPlatformSupported())
215 return config.Pass();
217 #endif // defined(WIDEVINE_CDM_AVAILABLE)
218 return scoped_ptr<TestLicenseServerConfig>();
222 scoped_ptr<TestLicenseServer> license_server_;
224 // We want to fail quickly when a test fails because an error is encountered.
225 virtual void AddWaitForTitles(content::TitleWatcher* title_watcher) OVERRIDE {
226 MediaBrowserTest::AddWaitForTitles(title_watcher);
227 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeNotSupportedError));
228 title_watcher->AlsoWaitForTitle(base::ASCIIToUTF16(kEmeKeyError));
231 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
232 #if defined(OS_ANDROID)
233 command_line->AppendSwitch(
234 switches::kDisableGestureRequirementForMediaPlayback);
235 #endif // defined(OS_ANDROID)
238 void SetUpCommandLineForKeySystem(const std::string& key_system,
239 CommandLine* command_line) {
240 if (GetServerConfig(key_system))
241 // Since the web and license servers listen on different ports, we need to
242 // disable web-security to send license requests to the license server.
243 // TODO(shadi): Add port forwarding to the test web server configuration.
244 command_line->AppendSwitch(switches::kDisableWebSecurity);
246 #if defined(ENABLE_PEPPER_CDMS)
247 if (IsExternalClearKey(key_system)) {
248 RegisterPepperCdm(command_line, kClearKeyCdmAdapterFileName, key_system);
250 #if defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
251 else if (IsWidevine(key_system)) {
252 RegisterPepperCdm(command_line, kWidevineCdmAdapterFileName, key_system);
254 #endif // defined(WIDEVINE_CDM_AVAILABLE) && defined(WIDEVINE_CDM_IS_COMPONENT)
255 #endif // defined(ENABLE_PEPPER_CDMS)
259 #if defined(ENABLE_PEPPER_CDMS)
260 void RegisterPepperCdm(CommandLine* command_line,
261 const std::string& adapter_name,
262 const std::string& key_system) {
263 DCHECK(!is_pepper_cdm_registered_)
264 << "RegisterPepperCdm() can only be called once.";
265 is_pepper_cdm_registered_ = true;
267 // Append the switch to register the Clear Key CDM Adapter.
268 base::FilePath plugin_dir;
269 EXPECT_TRUE(PathService::Get(base::DIR_MODULE, &plugin_dir));
270 base::FilePath plugin_lib = plugin_dir.AppendASCII(adapter_name);
271 EXPECT_TRUE(base::PathExists(plugin_lib)) << plugin_lib.value();
272 base::FilePath::StringType pepper_plugin = plugin_lib.value();
273 pepper_plugin.append(FILE_PATH_LITERAL("#CDM#0.1.0.0;"));
275 pepper_plugin.append(base::ASCIIToWide(GetPepperType(key_system)));
277 pepper_plugin.append(GetPepperType(key_system));
279 command_line->AppendSwitchNative(switches::kRegisterPepperPlugins,
283 // Adapted from key_systems.cc.
284 std::string GetPepperType(const std::string& key_system) {
285 if (IsExternalClearKey(key_system))
286 return kClearKeyCdmPluginMimeType;
287 #if defined(WIDEVINE_CDM_AVAILABLE)
288 if (IsWidevine(key_system))
289 return kWidevineCdmPluginMimeType;
290 #endif // WIDEVINE_CDM_AVAILABLE
295 #endif // defined(ENABLE_PEPPER_CDMS)
297 bool is_pepper_cdm_registered_;
300 #if defined(ENABLE_PEPPER_CDMS)
301 // Tests encrypted media playback using ExternalClearKey key system in
302 // decrypt-and-decode mode.
303 class ECKEncryptedMediaTest : public EncryptedMediaTestBase {
305 // We use special |key_system| names to do non-playback related tests, e.g.
306 // kExternalClearKeyFileIOTestKeySystem is used to test file IO.
307 void TestNonPlaybackCases(const std::string& key_system,
308 const std::string& expected_title) {
309 // Since we do not test playback, arbitrarily choose a test file and source
311 RunEncryptedMediaTest("encrypted_media_player.html",
323 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
324 EncryptedMediaTestBase::SetUpCommandLine(command_line);
325 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line);
329 #if defined(WIDEVINE_CDM_AVAILABLE)
330 // Tests encrypted media playback using Widevine key system.
331 class WVEncryptedMediaTest : public EncryptedMediaTestBase {
333 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
334 EncryptedMediaTestBase::SetUpCommandLine(command_line);
335 command_line->AppendSwitch(switches::kEnableEncryptedMedia);
336 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line);
340 #endif // defined(WIDEVINE_CDM_AVAILABLE)
341 #endif // defined(ENABLE_PEPPER_CDMS)
343 // Tests encrypted media playback with a combination of parameters:
344 // - char*: Key system name.
345 // - bool: True to load media using MSE, otherwise use src.
346 // - bool: True to use unprefixed EME, otherwise use prefixed EME.
348 // Note: Only parameterized (*_P) tests can be used. Non-parameterized (*_F)
349 // tests will crash at GetParam(). To add non-parameterized tests, use
350 // EncryptedMediaTestBase or one of its subclasses (e.g. WVEncryptedMediaTest).
351 class EncryptedMediaTest
352 : public EncryptedMediaTestBase,
353 public testing::WithParamInterface<
354 std::tr1::tuple<const char*, SrcType, EmeVersion> > {
356 std::string CurrentKeySystem() {
357 return std::tr1::get<0>(GetParam());
360 SrcType CurrentSourceType() {
361 return std::tr1::get<1>(GetParam());
364 EmeVersion CurrentEmeVersion() {
365 return std::tr1::get<2>(GetParam());
368 void TestSimplePlayback(const std::string& encrypted_media,
369 const std::string& media_type) {
370 RunSimpleEncryptedMediaTest(encrypted_media,
374 CurrentEmeVersion());
377 void RunInvalidResponseTest() {
378 RunEncryptedMediaTest("encrypted_media_player.html",
379 "bear-320x240-av-enc_av.webm",
389 void TestFrameSizeChange() {
390 RunEncryptedMediaTest("encrypted_frame_size_change.html",
391 "frame_size_change-av-enc-v.webm",
401 void TestConfigChange() {
402 DCHECK(IsMSESupported());
403 std::vector<StringPair> query_params;
404 query_params.push_back(std::make_pair("keySystem", CurrentKeySystem()));
405 query_params.push_back(std::make_pair("runEncrypted", "1"));
406 if (CurrentEmeVersion() == PREFIXED)
407 query_params.push_back(std::make_pair("usePrefixedEME", "1"));
408 RunEncryptedMediaTestPage("mse_config_change.html",
415 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
416 EncryptedMediaTestBase::SetUpCommandLine(command_line);
417 SetUpCommandLineForKeySystem(CurrentKeySystem(), command_line);
419 if (CurrentEmeVersion() == UNPREFIXED)
420 command_line->AppendSwitch(switches::kEnableEncryptedMedia);
424 using ::testing::Combine;
425 using ::testing::Values;
427 #if !defined(OS_ANDROID)
428 INSTANTIATE_TEST_CASE_P(SRC_ClearKey_Prefixed,
430 Combine(Values(kPrefixedClearKeyKeySystem),
434 // TODO(jrummell): Enable unprefixed tests before shipping unprefixed EME.
435 // Disabled now as they don't provide much additional coverage, but do take a
436 // bit of time to execute.
437 INSTANTIATE_TEST_CASE_P(DISABLED_SRC_ClearKey,
439 Combine(Values(kClearKeyKeySystem),
441 Values(UNPREFIXED)));
442 #endif // !defined(OS_ANDROID)
444 INSTANTIATE_TEST_CASE_P(MSE_ClearKey_Prefixed,
446 Combine(Values(kPrefixedClearKeyKeySystem),
449 INSTANTIATE_TEST_CASE_P(MSE_ClearKey,
451 Combine(Values(kClearKeyKeySystem),
453 Values(UNPREFIXED)));
455 // External Clear Key is currently only used on platforms that use Pepper CDMs.
456 #if defined(ENABLE_PEPPER_CDMS)
457 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey_Prefixed,
459 Combine(Values(kExternalClearKeyKeySystem),
462 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey,
464 Combine(Values(kExternalClearKeyKeySystem),
466 Values(UNPREFIXED)));
467 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey_Prefixed,
469 Combine(Values(kExternalClearKeyKeySystem),
472 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey,
474 Combine(Values(kExternalClearKeyKeySystem),
476 Values(UNPREFIXED)));
477 // To reduce test time, only run ExternalClearKeyDecryptOnly with MSE.
478 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly_Prefixed,
480 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem),
483 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly,
485 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem),
487 Values(UNPREFIXED)));
488 #endif // defined(ENABLE_PEPPER_CDMS)
490 #if defined(WIDEVINE_CDM_AVAILABLE)
491 // This test doesn't fully test playback with Widevine. So we only run Widevine
492 // test with MSE (no SRC) to reduce test time. Also, on Android EME only works
493 // with MSE and we cannot run this test with SRC.
494 INSTANTIATE_TEST_CASE_P(MSE_Widevine_Prefixed,
496 Combine(Values(kWidevineKeySystem),
500 // Following tests fail if Widevine is loaded as a component, crbug.com/356833.
501 #if !defined(WIDEVINE_CDM_IS_COMPONENT)
502 INSTANTIATE_TEST_CASE_P(MSE_Widevine,
504 Combine(Values(kWidevineKeySystem),
506 Values(UNPREFIXED)));
507 #endif // !defined(WIDEVINE_CDM_IS_COMPONENT)
508 #endif // defined(WIDEVINE_CDM_AVAILABLE)
510 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) {
511 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly);
514 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) {
515 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo);
518 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) {
519 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo);
522 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_WebM) {
523 TestSimplePlayback("bear-320x240-v-enc_v.webm", kWebMVideoOnly);
526 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM) {
527 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo);
530 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VP9Video_WebM) {
531 #if defined(WIDEVINE_CDM_AVAILABLE)
532 // TODO(xhwang): Remove this once VP9 is supported by Widevine CDM.
533 // See http://crbug.com/361318.
534 if (IsWidevine(CurrentKeySystem())) {
535 VLOG(0) << "VP9 not supported in Widevine CDM.";
539 TestSimplePlayback("bear-320x240-v-vp9-enc_v.webm", kWebMVP9VideoOnly);
542 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, InvalidResponseKeyError) {
543 RunInvalidResponseTest();
546 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, ConfigChangeVideo) {
547 if (CurrentSourceType() != MSE || !IsMSESupported()) {
548 VLOG(0) << "Skipping test - ConfigChange test requires MSE.";
551 if (!IsPlayBackPossible(CurrentKeySystem())) {
552 VLOG(0) << "Skipping test - ConfigChange test requires video playback.";
558 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, FrameSizeChangeVideo) {
559 // Times out on Windows XP. http://crbug.com/171937
561 if (base::win::GetVersion() < base::win::VERSION_VISTA)
564 if (!IsPlayBackPossible(CurrentKeySystem())) {
565 VLOG(0) << "Skipping test - FrameSizeChange test requires video playback.";
568 TestFrameSizeChange();
571 #if defined(USE_PROPRIETARY_CODECS)
572 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_MP4) {
573 // MP4 without MSE is not support yet, http://crbug.com/170793.
574 if (CurrentSourceType() != MSE) {
575 VLOG(0) << "Skipping test; Can only play MP4 encrypted streams by MSE.";
578 TestSimplePlayback("bear-640x360-v_frag-cenc.mp4", kMP4VideoOnly);
581 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_MP4) {
582 // MP4 without MSE is not support yet, http://crbug.com/170793.
583 if (CurrentSourceType() != MSE) {
584 VLOG(0) << "Skipping test; Can only play MP4 encrypted streams by MSE.";
587 TestSimplePlayback("bear-640x360-a_frag-cenc.mp4", kMP4AudioOnly);
589 #endif // defined(USE_PROPRIETARY_CODECS)
591 #if defined(WIDEVINE_CDM_AVAILABLE)
592 // The parent key system cannot be used in generateKeyRequest.
593 IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException_Prefixed) {
594 RunEncryptedMediaTest("encrypted_media_player.html",
602 kEmeNotSupportedError);
605 // TODO(jrummell): http://crbug.com/349181
606 // The parent key system cannot be used when creating MediaKeys.
607 IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException) {
608 RunEncryptedMediaTest("encrypted_media_player.html",
616 kEmeNotSupportedError);
618 #endif // defined(WIDEVINE_CDM_AVAILABLE)
620 #if defined(ENABLE_PEPPER_CDMS)
621 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, InitializeCDMFail) {
622 TestNonPlaybackCases(kExternalClearKeyInitializeFailKeySystem, kEmeKeyError);
625 // When CDM crashes, we should still get a decode error.
626 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, CDMCrashDuringDecode) {
628 TestNonPlaybackCases(kExternalClearKeyCrashKeySystem, kError);
631 // Testing that the media browser test does fail on plugin crash.
632 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, CDMExpectedCrash) {
633 // Plugin crash is not ignored by default, the test is expected to fail.
634 EXPECT_NONFATAL_FAILURE(
635 TestNonPlaybackCases(kExternalClearKeyCrashKeySystem, kError),
639 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) {
640 TestNonPlaybackCases(kExternalClearKeyFileIOTestKeySystem,
644 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) {
645 RunEncryptedMediaTest("encrypted_media_player.html",
646 "bear-320x240-v-enc_v.webm",
648 kExternalClearKeyKeySystem,
656 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) {
657 // TODO(xhwang): Add a specific error for this failure, e.g. kSessionNotFound.
658 RunEncryptedMediaTest("encrypted_media_player.html",
659 "bear-320x240-v-enc_v.webm",
661 kExternalClearKeyKeySystem,
668 #endif // defined(ENABLE_PEPPER_CDMS)