OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/win/windows_version.h" | 9 #include "base/win/windows_version.h" |
10 #include "chrome/browser/media/media_browsertest.h" | 10 #include "chrome/browser/media/media_browsertest.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
108 return key_system == kExternalClearKeyKeySystem || | 108 return key_system == kExternalClearKeyKeySystem || |
109 IsParentKeySystemOf(kExternalClearKeyKeySystem, key_system); | 109 IsParentKeySystemOf(kExternalClearKeyKeySystem, key_system); |
110 } | 110 } |
111 | 111 |
112 #if defined(WIDEVINE_CDM_AVAILABLE) | 112 #if defined(WIDEVINE_CDM_AVAILABLE) |
113 bool IsWidevine(const std::string& key_system) { | 113 bool IsWidevine(const std::string& key_system) { |
114 return key_system == kWidevineKeySystem; | 114 return key_system == kWidevineKeySystem; |
115 } | 115 } |
116 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 116 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
117 | 117 |
118 void RunEncryptedMediaTestPage(const std::string& html_page, | 118 void RunEncryptedMediaTestPage( |
119 const std::string& key_system, | 119 const std::string& html_page, |
120 std::vector<StringPair>* query_params, | 120 const std::string& key_system, |
121 const std::string& expected_title) { | 121 const media::QueryParams& query_params, |
122 StartLicenseServerIfNeeded(key_system, query_params); | 122 const std::string& expected_title) { |
123 RunMediaTestPage(html_page, query_params, expected_title, true); | 123 media::QueryParams new_query_params = query_params; |
124 StartLicenseServerIfNeeded(key_system, &new_query_params); | |
125 RunMediaTestPage(html_page, new_query_params, expected_title, true); | |
124 } | 126 } |
125 | 127 |
126 // Tests |html_page| using |media_file| (with |media_type|) and |key_system|. | 128 // Tests |html_page| using |media_file| (with |media_type|) and |key_system|. |
127 // When |session_to_load| is not empty, the test will try to load | 129 // When |session_to_load| is not empty, the test will try to load |
128 // |session_to_load| with stored keys, instead of creating a new session | 130 // |session_to_load| with stored keys, instead of creating a new session |
129 // and trying to update it with licenses. | 131 // and trying to update it with licenses. |
130 // When |force_invalid_response| is true, the test will provide invalid | 132 // When |force_invalid_response| is true, the test will provide invalid |
131 // responses, which should trigger errors. | 133 // responses, which should trigger errors. |
132 // TODO(xhwang): Find an easier way to pass multiple configuration test | 134 // TODO(xhwang): Find an easier way to pass multiple configuration test |
133 // options. | 135 // options. |
134 void RunEncryptedMediaTest(const std::string& html_page, | 136 void RunEncryptedMediaTest(const std::string& html_page, |
135 const std::string& media_file, | 137 const std::string& media_file, |
136 const std::string& media_type, | 138 const std::string& media_type, |
137 const std::string& key_system, | 139 const std::string& key_system, |
138 SrcType src_type, | 140 SrcType src_type, |
139 EmeVersion eme_version, | 141 EmeVersion eme_version, |
140 const std::string& session_to_load, | 142 const std::string& session_to_load, |
141 bool force_invalid_response, | 143 bool force_invalid_response, |
142 const std::string& expected_title) { | 144 const std::string& expected_title) { |
143 if (src_type == MSE && !IsMSESupported()) { | 145 if (src_type == MSE && !IsMSESupported()) { |
144 VLOG(0) << "Skipping test - MSE not supported."; | 146 VLOG(0) << "Skipping test - MSE not supported."; |
145 return; | 147 return; |
146 } | 148 } |
147 std::vector<StringPair> query_params; | 149 media::QueryParams query_params; |
148 query_params.push_back(std::make_pair("mediaFile", media_file)); | 150 query_params.push_back(std::make_pair("mediaFile", media_file)); |
149 query_params.push_back(std::make_pair("mediaType", media_type)); | 151 query_params.push_back(std::make_pair("mediaType", media_type)); |
150 query_params.push_back(std::make_pair("keySystem", key_system)); | 152 query_params.push_back(std::make_pair("keySystem", key_system)); |
151 if (src_type == MSE) | 153 if (src_type == MSE) |
152 query_params.push_back(std::make_pair("useMSE", "1")); | 154 query_params.push_back(std::make_pair("useMSE", "1")); |
153 if (eme_version == PREFIXED) | 155 if (eme_version == PREFIXED) |
154 query_params.push_back(std::make_pair("usePrefixedEME", "1")); | 156 query_params.push_back(std::make_pair("usePrefixedEME", "1")); |
155 if (force_invalid_response) | 157 if (force_invalid_response) |
156 query_params.push_back(std::make_pair("forceInvalidResponse", "1")); | 158 query_params.push_back(std::make_pair("forceInvalidResponse", "1")); |
157 if (!session_to_load.empty()) | 159 if (!session_to_load.empty()) |
158 query_params.push_back(std::make_pair("sessionToLoad", session_to_load)); | 160 query_params.push_back(std::make_pair("sessionToLoad", session_to_load)); |
159 RunEncryptedMediaTestPage(html_page, key_system, &query_params, | 161 RunEncryptedMediaTestPage(html_page, key_system, query_params, |
160 expected_title); | 162 expected_title); |
161 } | 163 } |
162 | 164 |
163 void RunSimpleEncryptedMediaTest(const std::string& media_file, | 165 void RunSimpleEncryptedMediaTest(const std::string& media_file, |
164 const std::string& media_type, | 166 const std::string& media_type, |
165 const std::string& key_system, | 167 const std::string& key_system, |
166 SrcType src_type, | 168 SrcType src_type, |
167 EmeVersion eme_version) { | 169 EmeVersion eme_version) { |
168 std::string expected_title = kEnded; | 170 std::string expected_title = kEnded; |
169 if (!IsPlayBackPossible(key_system)) | 171 if (!IsPlayBackPossible(key_system)) |
(...skipping 11 matching lines...) Expand all Loading... | |
181 // Check KeyMessage received for all key systems. | 183 // Check KeyMessage received for all key systems. |
182 bool receivedKeyMessage = false; | 184 bool receivedKeyMessage = false; |
183 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 185 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
184 browser()->tab_strip_model()->GetActiveWebContents(), | 186 browser()->tab_strip_model()->GetActiveWebContents(), |
185 "window.domAutomationController.send(" | 187 "window.domAutomationController.send(" |
186 "document.querySelector('video').receivedKeyMessage);", | 188 "document.querySelector('video').receivedKeyMessage);", |
187 &receivedKeyMessage)); | 189 &receivedKeyMessage)); |
188 EXPECT_TRUE(receivedKeyMessage); | 190 EXPECT_TRUE(receivedKeyMessage); |
189 } | 191 } |
190 | 192 |
191 | 193 void StartLicenseServerIfNeeded( |
xhwang
2014/07/07 23:11:22
nit: add comment about what happens to the |query_
shadi
2014/07/07 23:38:13
Done.
| |
192 void StartLicenseServerIfNeeded(const std::string& key_system, | 194 const std::string& key_system, |
193 std::vector<StringPair>* query_params) { | 195 media::QueryParams* query_params) { |
194 scoped_ptr<TestLicenseServerConfig> config = GetServerConfig(key_system); | 196 scoped_ptr<TestLicenseServerConfig> config = GetServerConfig(key_system); |
195 if (!config) | 197 if (!config) |
196 return; | 198 return; |
197 license_server_.reset(new TestLicenseServer(config.Pass())); | 199 license_server_.reset(new TestLicenseServer(config.Pass())); |
198 EXPECT_TRUE(license_server_->Start()); | 200 EXPECT_TRUE(license_server_->Start()); |
199 query_params->push_back(std::make_pair("licenseServerURL", | 201 query_params->push_back( |
200 license_server_->GetServerURL())); | 202 std::make_pair("licenseServerURL", license_server_->GetServerURL())); |
201 } | 203 } |
202 | 204 |
203 bool IsPlayBackPossible(const std::string& key_system) { | 205 bool IsPlayBackPossible(const std::string& key_system) { |
204 #if defined(WIDEVINE_CDM_AVAILABLE) | 206 #if defined(WIDEVINE_CDM_AVAILABLE) |
205 if (IsWidevine(key_system) && !GetServerConfig(key_system)) | 207 if (IsWidevine(key_system) && !GetServerConfig(key_system)) |
206 return false; | 208 return false; |
207 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 209 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
208 return true; | 210 return true; |
209 } | 211 } |
210 | 212 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
305 // decrypt-and-decode mode. | 307 // decrypt-and-decode mode. |
306 class ECKEncryptedMediaTest : public EncryptedMediaTestBase { | 308 class ECKEncryptedMediaTest : public EncryptedMediaTestBase { |
307 public: | 309 public: |
308 // We use special |key_system| names to do non-playback related tests, e.g. | 310 // We use special |key_system| names to do non-playback related tests, e.g. |
309 // kExternalClearKeyFileIOTestKeySystem is used to test file IO. | 311 // kExternalClearKeyFileIOTestKeySystem is used to test file IO. |
310 void TestNonPlaybackCases(const std::string& key_system, | 312 void TestNonPlaybackCases(const std::string& key_system, |
311 const std::string& expected_title) { | 313 const std::string& expected_title) { |
312 // Since we do not test playback, arbitrarily choose a test file and source | 314 // Since we do not test playback, arbitrarily choose a test file and source |
313 // type. | 315 // type. |
314 RunEncryptedMediaTest(kDefaultEmePlayer, | 316 RunEncryptedMediaTest(kDefaultEmePlayer, |
315 "bear-a-enc_a.webm", | 317 "bear-a_enc-a.webm", |
316 kWebMAudioOnly, | 318 kWebMAudioOnly, |
317 key_system, | 319 key_system, |
318 SRC, | 320 SRC, |
319 PREFIXED, | 321 PREFIXED, |
320 kNoSessionToLoad, | 322 kNoSessionToLoad, |
321 false, | 323 false, |
322 expected_title); | 324 expected_title); |
323 } | 325 } |
324 | 326 |
325 protected: | 327 protected: |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 const std::string& media_type) { | 374 const std::string& media_type) { |
373 RunSimpleEncryptedMediaTest(encrypted_media, | 375 RunSimpleEncryptedMediaTest(encrypted_media, |
374 media_type, | 376 media_type, |
375 CurrentKeySystem(), | 377 CurrentKeySystem(), |
376 CurrentSourceType(), | 378 CurrentSourceType(), |
377 CurrentEmeVersion()); | 379 CurrentEmeVersion()); |
378 } | 380 } |
379 | 381 |
380 void RunInvalidResponseTest() { | 382 void RunInvalidResponseTest() { |
381 RunEncryptedMediaTest(kDefaultEmePlayer, | 383 RunEncryptedMediaTest(kDefaultEmePlayer, |
382 "bear-320x240-av-enc_av.webm", | 384 "bear-320x240-av_enc-av.webm", |
383 kWebMAudioVideo, | 385 kWebMAudioVideo, |
384 CurrentKeySystem(), | 386 CurrentKeySystem(), |
385 CurrentSourceType(), | 387 CurrentSourceType(), |
386 CurrentEmeVersion(), | 388 CurrentEmeVersion(), |
387 kNoSessionToLoad, | 389 kNoSessionToLoad, |
388 true, | 390 true, |
389 kEmeKeyError); | 391 kEmeKeyError); |
390 } | 392 } |
391 | 393 |
392 void TestFrameSizeChange() { | 394 void TestFrameSizeChange() { |
393 RunEncryptedMediaTest("encrypted_frame_size_change.html", | 395 RunEncryptedMediaTest("encrypted_frame_size_change.html", |
394 "frame_size_change-av-enc-v.webm", | 396 "frame_size_change-av_enc-v.webm", |
395 kWebMAudioVideo, | 397 kWebMAudioVideo, |
396 CurrentKeySystem(), | 398 CurrentKeySystem(), |
397 CurrentSourceType(), | 399 CurrentSourceType(), |
398 CurrentEmeVersion(), | 400 CurrentEmeVersion(), |
399 kNoSessionToLoad, | 401 kNoSessionToLoad, |
400 false, | 402 false, |
401 kEnded); | 403 kEnded); |
402 } | 404 } |
403 | 405 |
404 void TestConfigChange() { | 406 void TestConfigChange() { |
405 DCHECK(IsMSESupported()); | 407 DCHECK(IsMSESupported()); |
406 std::vector<StringPair> query_params; | 408 media::QueryParams query_params; |
407 query_params.push_back(std::make_pair("keySystem", CurrentKeySystem())); | 409 query_params.push_back(std::make_pair("keySystem", CurrentKeySystem())); |
408 query_params.push_back(std::make_pair("runEncrypted", "1")); | 410 query_params.push_back(std::make_pair("runEncrypted", "1")); |
409 if (CurrentEmeVersion() == PREFIXED) | 411 if (CurrentEmeVersion() == PREFIXED) |
410 query_params.push_back(std::make_pair("usePrefixedEME", "1")); | 412 query_params.push_back(std::make_pair("usePrefixedEME", "1")); |
411 RunEncryptedMediaTestPage("mse_config_change.html", | 413 RunEncryptedMediaTestPage("mse_config_change.html", |
412 CurrentKeySystem(), | 414 CurrentKeySystem(), |
413 &query_params, | 415 query_params, |
414 kEnded); | 416 kEnded); |
415 } | 417 } |
416 | 418 |
417 protected: | 419 protected: |
418 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | 420 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { |
419 EncryptedMediaTestBase::SetUpCommandLine(command_line); | 421 EncryptedMediaTestBase::SetUpCommandLine(command_line); |
420 SetUpCommandLineForKeySystem(CurrentKeySystem(), command_line); | 422 SetUpCommandLineForKeySystem(CurrentKeySystem(), command_line); |
421 | 423 |
422 if (CurrentEmeVersion() == UNPREFIXED) | 424 if (CurrentEmeVersion() == UNPREFIXED) |
423 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | 425 command_line->AppendSwitch(switches::kEnableEncryptedMedia); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
481 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly_Prefixed, | 483 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly_Prefixed, |
482 EncryptedMediaTest, | 484 EncryptedMediaTest, |
483 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), | 485 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), |
484 Values(MSE), | 486 Values(MSE), |
485 Values(PREFIXED))); | 487 Values(PREFIXED))); |
486 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly, | 488 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly, |
487 EncryptedMediaTest, | 489 EncryptedMediaTest, |
488 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), | 490 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), |
489 Values(MSE), | 491 Values(MSE), |
490 Values(UNPREFIXED))); | 492 Values(UNPREFIXED))); |
491 #endif // defined(ENABLE_PEPPER_CDMS) | 493 #endif // defined(ENABLE_PEPPER_CDMS) |
492 | 494 |
493 #if defined(WIDEVINE_CDM_AVAILABLE) | 495 #if defined(WIDEVINE_CDM_AVAILABLE) |
494 // This test doesn't fully test playback with Widevine. So we only run Widevine | 496 // This test doesn't fully test playback with Widevine. So we only run Widevine |
495 // test with MSE (no SRC) to reduce test time. Also, on Android EME only works | 497 // test with MSE (no SRC) to reduce test time. Also, on Android EME only works |
496 // with MSE and we cannot run this test with SRC. | 498 // with MSE and we cannot run this test with SRC. |
497 INSTANTIATE_TEST_CASE_P(MSE_Widevine_Prefixed, | 499 INSTANTIATE_TEST_CASE_P(MSE_Widevine_Prefixed, |
498 EncryptedMediaTest, | 500 EncryptedMediaTest, |
499 Combine(Values(kWidevineKeySystem), | 501 Combine(Values(kWidevineKeySystem), |
500 Values(MSE), | 502 Values(MSE), |
501 Values(PREFIXED))); | 503 Values(PREFIXED))); |
502 | 504 |
503 // Following tests fail if Widevine is loaded as a component, crbug.com/356833. | 505 // Following tests fail if Widevine is loaded as a component, crbug.com/356833. |
504 #if !defined(WIDEVINE_CDM_IS_COMPONENT) | 506 #if !defined(WIDEVINE_CDM_IS_COMPONENT) |
505 INSTANTIATE_TEST_CASE_P(MSE_Widevine, | 507 INSTANTIATE_TEST_CASE_P(MSE_Widevine, |
506 EncryptedMediaTest, | 508 EncryptedMediaTest, |
507 Combine(Values(kWidevineKeySystem), | 509 Combine(Values(kWidevineKeySystem), |
508 Values(MSE), | 510 Values(MSE), |
509 Values(UNPREFIXED))); | 511 Values(UNPREFIXED))); |
510 #endif // !defined(WIDEVINE_CDM_IS_COMPONENT) | 512 #endif // !defined(WIDEVINE_CDM_IS_COMPONENT) |
511 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 513 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
512 | 514 |
513 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) { | 515 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioOnly_WebM) { |
514 TestSimplePlayback("bear-a-enc_a.webm", kWebMAudioOnly); | 516 TestSimplePlayback("bear-a_enc-a.webm", kWebMAudioOnly); |
515 } | 517 } |
516 | 518 |
517 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) { | 519 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_AudioClearVideo_WebM) { |
518 TestSimplePlayback("bear-320x240-av-enc_a.webm", kWebMAudioVideo); | 520 TestSimplePlayback("bear-320x240-av_enc-a.webm", kWebMAudioVideo); |
519 } | 521 } |
520 | 522 |
521 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) { | 523 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoAudio_WebM) { |
522 TestSimplePlayback("bear-320x240-av-enc_av.webm", kWebMAudioVideo); | 524 TestSimplePlayback("bear-320x240-av_enc-av.webm", kWebMAudioVideo); |
523 } | 525 } |
524 | 526 |
525 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_WebM) { | 527 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoOnly_WebM) { |
526 TestSimplePlayback("bear-320x240-v-enc_v.webm", kWebMVideoOnly); | 528 TestSimplePlayback("bear-320x240-v_enc-v.webm", kWebMVideoOnly); |
527 } | 529 } |
528 | 530 |
529 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM) { | 531 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VideoClearAudio_WebM) { |
530 TestSimplePlayback("bear-320x240-av-enc_v.webm", kWebMAudioVideo); | 532 TestSimplePlayback("bear-320x240-av_enc-v.webm", kWebMAudioVideo); |
531 } | 533 } |
532 | 534 |
533 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VP9Video_WebM) { | 535 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, Playback_VP9Video_WebM) { |
534 TestSimplePlayback("bear-320x240-v-vp9-enc_v.webm", kWebMVP9VideoOnly); | 536 TestSimplePlayback("bear-320x240-v-vp9_enc-v.webm", kWebMVP9VideoOnly); |
535 } | 537 } |
536 | 538 |
537 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, InvalidResponseKeyError) { | 539 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, InvalidResponseKeyError) { |
538 RunInvalidResponseTest(); | 540 RunInvalidResponseTest(); |
539 } | 541 } |
540 | 542 |
541 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, ConfigChangeVideo) { | 543 IN_PROC_BROWSER_TEST_P(EncryptedMediaTest, ConfigChangeVideo) { |
542 if (CurrentSourceType() != MSE || !IsMSESupported()) { | 544 if (CurrentSourceType() != MSE || !IsMSESupported()) { |
543 VLOG(0) << "Skipping test - ConfigChange test requires MSE."; | 545 VLOG(0) << "Skipping test - ConfigChange test requires MSE."; |
544 return; | 546 return; |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
580 return; | 582 return; |
581 } | 583 } |
582 TestSimplePlayback("bear-640x360-a_frag-cenc.mp4", kMP4AudioOnly); | 584 TestSimplePlayback("bear-640x360-a_frag-cenc.mp4", kMP4AudioOnly); |
583 } | 585 } |
584 #endif // defined(USE_PROPRIETARY_CODECS) | 586 #endif // defined(USE_PROPRIETARY_CODECS) |
585 | 587 |
586 #if defined(WIDEVINE_CDM_AVAILABLE) | 588 #if defined(WIDEVINE_CDM_AVAILABLE) |
587 // The parent key system cannot be used in generateKeyRequest. | 589 // The parent key system cannot be used in generateKeyRequest. |
588 IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException_Prefixed) { | 590 IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException_Prefixed) { |
589 RunEncryptedMediaTest(kDefaultEmePlayer, | 591 RunEncryptedMediaTest(kDefaultEmePlayer, |
590 "bear-a-enc_a.webm", | 592 "bear-a_enc-a.webm", |
591 kWebMAudioOnly, | 593 kWebMAudioOnly, |
592 "com.widevine", | 594 "com.widevine", |
593 MSE, | 595 MSE, |
594 PREFIXED, | 596 PREFIXED, |
595 kNoSessionToLoad, | 597 kNoSessionToLoad, |
596 false, | 598 false, |
597 kEmeNotSupportedError); | 599 kEmeNotSupportedError); |
598 } | 600 } |
599 | 601 |
600 // TODO(jrummell): http://crbug.com/349181 | 602 // TODO(jrummell): http://crbug.com/349181 |
601 // The parent key system cannot be used when creating MediaKeys. | 603 // The parent key system cannot be used when creating MediaKeys. |
602 IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException) { | 604 IN_PROC_BROWSER_TEST_F(WVEncryptedMediaTest, ParentThrowsException) { |
603 RunEncryptedMediaTest(kDefaultEmePlayer, | 605 RunEncryptedMediaTest(kDefaultEmePlayer, |
604 "bear-a-enc_a.webm", | 606 "bear-a_enc-a.webm", |
605 kWebMAudioOnly, | 607 kWebMAudioOnly, |
606 "com.widevine", | 608 "com.widevine", |
607 MSE, | 609 MSE, |
608 UNPREFIXED, | 610 UNPREFIXED, |
609 kNoSessionToLoad, | 611 kNoSessionToLoad, |
610 false, | 612 false, |
611 kEmeNotSupportedError); | 613 kEmeNotSupportedError); |
612 } | 614 } |
613 #endif // defined(WIDEVINE_CDM_AVAILABLE) | 615 #endif // defined(WIDEVINE_CDM_AVAILABLE) |
614 | 616 |
(...skipping 18 matching lines...) Expand all Loading... | |
633 "plugin crash"); | 635 "plugin crash"); |
634 } | 636 } |
635 | 637 |
636 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) { | 638 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, FileIOTest) { |
637 TestNonPlaybackCases(kExternalClearKeyFileIOTestKeySystem, | 639 TestNonPlaybackCases(kExternalClearKeyFileIOTestKeySystem, |
638 kFileIOTestSuccess); | 640 kFileIOTestSuccess); |
639 } | 641 } |
640 | 642 |
641 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) { | 643 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadLoadableSession) { |
642 RunEncryptedMediaTest(kDefaultEmePlayer, | 644 RunEncryptedMediaTest(kDefaultEmePlayer, |
643 "bear-320x240-v-enc_v.webm", | 645 "bear-320x240-v_enc-v.webm", |
644 kWebMVideoOnly, | 646 kWebMVideoOnly, |
645 kExternalClearKeyKeySystem, | 647 kExternalClearKeyKeySystem, |
646 SRC, | 648 SRC, |
647 PREFIXED, | 649 PREFIXED, |
648 kLoadableSession, | 650 kLoadableSession, |
649 false, | 651 false, |
650 kEnded); | 652 kEnded); |
651 } | 653 } |
652 | 654 |
653 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) { | 655 IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) { |
654 // TODO(xhwang): Add a specific error for this failure, e.g. kSessionNotFound. | 656 // TODO(xhwang): Add a specific error for this failure, e.g. kSessionNotFound. |
655 RunEncryptedMediaTest(kDefaultEmePlayer, | 657 RunEncryptedMediaTest(kDefaultEmePlayer, |
656 "bear-320x240-v-enc_v.webm", | 658 "bear-320x240-v_enc-v.webm", |
657 kWebMVideoOnly, | 659 kWebMVideoOnly, |
658 kExternalClearKeyKeySystem, | 660 kExternalClearKeyKeySystem, |
659 SRC, | 661 SRC, |
660 PREFIXED, | 662 PREFIXED, |
661 kUnknownSession, | 663 kUnknownSession, |
662 false, | 664 false, |
663 kEmeKeyError); | 665 kEmeKeyError); |
664 } | 666 } |
665 #endif // defined(ENABLE_PEPPER_CDMS) | 667 #endif // defined(ENABLE_PEPPER_CDMS) |
OLD | NEW |