| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 Values(SRC), | 525 Values(SRC), |
| 526 Values(PREFIXED))); | 526 Values(PREFIXED))); |
| 527 | 527 |
| 528 INSTANTIATE_TEST_CASE_P(SRC_ClearKey, | 528 INSTANTIATE_TEST_CASE_P(SRC_ClearKey, |
| 529 EncryptedMediaTest, | 529 EncryptedMediaTest, |
| 530 Combine(Values(kClearKeyKeySystem), | 530 Combine(Values(kClearKeyKeySystem), |
| 531 Values(SRC), | 531 Values(SRC), |
| 532 Values(UNPREFIXED))); | 532 Values(UNPREFIXED))); |
| 533 #endif // !defined(OS_ANDROID) | 533 #endif // !defined(OS_ANDROID) |
| 534 | 534 |
| 535 #if !defined(OS_WIN) | |
| 536 // Tests flaky on Win 7 dbg. http://crbug.com/517018 | 535 // Tests flaky on Win 7 dbg. http://crbug.com/517018 |
| 537 INSTANTIATE_TEST_CASE_P(MSE_ClearKey_Prefixed, | 536 INSTANTIATE_TEST_CASE_P(MSE_ClearKey_Prefixed, |
| 538 EncryptedMediaTest, | 537 EncryptedMediaTest, |
| 539 Combine(Values(kPrefixedClearKeyKeySystem), | 538 Combine(Values(kPrefixedClearKeyKeySystem), |
| 540 Values(MSE), | 539 Values(MSE), |
| 541 Values(PREFIXED))); | 540 Values(PREFIXED))); |
| 542 INSTANTIATE_TEST_CASE_P(MSE_ClearKey, | 541 INSTANTIATE_TEST_CASE_P(MSE_ClearKey, |
| 543 EncryptedMediaTest, | 542 EncryptedMediaTest, |
| 544 Combine(Values(kClearKeyKeySystem), | 543 Combine(Values(kClearKeyKeySystem), |
| 545 Values(MSE), | 544 Values(MSE), |
| 546 Values(UNPREFIXED))); | 545 Values(UNPREFIXED))); |
| 547 #endif // !defined(OS_WIN) | |
| 548 | 546 |
| 549 // External Clear Key is currently only used on platforms that use Pepper CDMs. | 547 // External Clear Key is currently only used on platforms that use Pepper CDMs. |
| 550 #if defined(ENABLE_PEPPER_CDMS) | 548 #if defined(ENABLE_PEPPER_CDMS) |
| 551 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey_Prefixed, | 549 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey_Prefixed, |
| 552 EncryptedMediaTest, | 550 EncryptedMediaTest, |
| 553 Combine(Values(kExternalClearKeyKeySystem), | 551 Combine(Values(kExternalClearKeyKeySystem), |
| 554 Values(SRC), | 552 Values(SRC), |
| 555 Values(PREFIXED))); | 553 Values(PREFIXED))); |
| 556 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey, | 554 INSTANTIATE_TEST_CASE_P(SRC_ExternalClearKey, |
| 557 EncryptedMediaTest, | 555 EncryptedMediaTest, |
| 558 Combine(Values(kExternalClearKeyKeySystem), | 556 Combine(Values(kExternalClearKeyKeySystem), |
| 559 Values(SRC), | 557 Values(SRC), |
| 560 Values(UNPREFIXED))); | 558 Values(UNPREFIXED))); |
| 561 #if !defined(OS_WIN) | 559 |
| 562 const char kExternalClearKeyDecryptOnlyKeySystem[] = | 560 const char kExternalClearKeyDecryptOnlyKeySystem[] = |
| 563 "org.chromium.externalclearkey.decryptonly"; | 561 "org.chromium.externalclearkey.decryptonly"; |
| 564 | 562 |
| 565 // Tests flaky on Win 7 dbg. http://crbug.com/517018 | 563 // Tests flaky on Win 7 dbg. http://crbug.com/517018 |
| 566 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey_Prefixed, | 564 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey_Prefixed, |
| 567 EncryptedMediaTest, | 565 EncryptedMediaTest, |
| 568 Combine(Values(kExternalClearKeyKeySystem), | 566 Combine(Values(kExternalClearKeyKeySystem), |
| 569 Values(MSE), | 567 Values(MSE), |
| 570 Values(PREFIXED))); | 568 Values(PREFIXED))); |
| 571 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey, | 569 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKey, |
| 572 EncryptedMediaTest, | 570 EncryptedMediaTest, |
| 573 Combine(Values(kExternalClearKeyKeySystem), | 571 Combine(Values(kExternalClearKeyKeySystem), |
| 574 Values(MSE), | 572 Values(MSE), |
| 575 Values(UNPREFIXED))); | 573 Values(UNPREFIXED))); |
| 576 // To reduce test time, only run ExternalClearKeyDecryptOnly with MSE. | 574 // To reduce test time, only run ExternalClearKeyDecryptOnly with MSE. |
| 577 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly_Prefixed, | 575 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly_Prefixed, |
| 578 EncryptedMediaTest, | 576 EncryptedMediaTest, |
| 579 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), | 577 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), |
| 580 Values(MSE), | 578 Values(MSE), |
| 581 Values(PREFIXED))); | 579 Values(PREFIXED))); |
| 582 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly, | 580 INSTANTIATE_TEST_CASE_P(MSE_ExternalClearKeyDecryptOnly, |
| 583 EncryptedMediaTest, | 581 EncryptedMediaTest, |
| 584 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), | 582 Combine(Values(kExternalClearKeyDecryptOnlyKeySystem), |
| 585 Values(MSE), | 583 Values(MSE), |
| 586 Values(UNPREFIXED))); | 584 Values(UNPREFIXED))); |
| 587 #endif // !defined(OS_WIN) | |
| 588 #endif // defined(ENABLE_PEPPER_CDMS) | 585 #endif // defined(ENABLE_PEPPER_CDMS) |
| 589 | 586 |
| 590 #if defined(WIDEVINE_CDM_AVAILABLE) | 587 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 591 | 588 |
| 592 // Prefixed Widevine tests fail in Chrome OS official builds due to the request | 589 // Prefixed Widevine tests fail in Chrome OS official builds due to the request |
| 593 // for permissions. Since prefixed EME is deprecated and will be removed soon, | 590 // for permissions. Since prefixed EME is deprecated and will be removed soon, |
| 594 // don't run these tests. http://crbug.com/430711 | 591 // don't run these tests. http://crbug.com/430711 |
| 595 #if !(defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD)) | 592 #if !(defined(OS_CHROMEOS) && defined(OFFICIAL_BUILD)) |
| 596 | 593 |
| 597 // This test doesn't fully test playback with Widevine. So we only run Widevine | 594 // This test doesn't fully test playback with Widevine. So we only run Widevine |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 } | 839 } |
| 843 | 840 |
| 844 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadLoadableSession) { | 841 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadLoadableSession) { |
| 845 TestPlaybackCase(kLoadableSession, kEnded); | 842 TestPlaybackCase(kLoadableSession, kEnded); |
| 846 } | 843 } |
| 847 | 844 |
| 848 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadUnknownSession) { | 845 IN_PROC_BROWSER_TEST_F(ECKPrefixedEncryptedMediaTest, LoadUnknownSession) { |
| 849 TestPlaybackCase(kUnknownSession, kPrefixedEmeErrorEvent); | 846 TestPlaybackCase(kUnknownSession, kPrefixedEmeErrorEvent); |
| 850 } | 847 } |
| 851 #endif // defined(ENABLE_PEPPER_CDMS) | 848 #endif // defined(ENABLE_PEPPER_CDMS) |
| OLD | NEW |