| 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 video_webm_codecs_.push_back("vp8.0"); | 112 video_webm_codecs_.push_back("vp8.0"); |
| 113 video_webm_codecs_.push_back("vp9"); | 113 video_webm_codecs_.push_back("vp9"); |
| 114 video_webm_codecs_.push_back("vp9.0"); | 114 video_webm_codecs_.push_back("vp9.0"); |
| 115 | 115 |
| 116 audio_mp4_codecs_.push_back("mp4a.40.2"); | 116 audio_mp4_codecs_.push_back("mp4a.40.2"); |
| 117 | 117 |
| 118 video_mp4_codecs_.push_back("avc1.42001E"); // Baseline profile. | 118 video_mp4_codecs_.push_back("avc1.42001E"); // Baseline profile. |
| 119 video_mp4_codecs_.push_back("avc1.4D000C"); // Main profile. | 119 video_mp4_codecs_.push_back("avc1.4D000C"); // Main profile. |
| 120 video_mp4_codecs_.push_back("avc3.64001F"); // High profile. | 120 video_mp4_codecs_.push_back("avc3.64001F"); // High profile. |
| 121 | 121 |
| 122 video_mp4_codecs_.push_back("vp09.00.10.08"); | |
| 123 | |
| 124 video_mp4_hi10p_codecs_.push_back("avc1.6E001E"); // Hi10P profile | 122 video_mp4_hi10p_codecs_.push_back("avc1.6E001E"); // Hi10P profile |
| 125 | 123 |
| 126 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) | 124 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) |
| 127 video_mp4_codecs_.push_back("hvc1.1.6.L93.B0"); | 125 video_mp4_codecs_.push_back("hvc1.1.6.L93.B0"); |
| 128 video_mp4_codecs_.push_back("hev1.1.6.L93.B0"); | 126 video_mp4_codecs_.push_back("hev1.1.6.L93.B0"); |
| 129 #else | 127 #else |
| 130 invalid_codecs_.push_back("hvc1.1.6.L93.B0"); | 128 invalid_codecs_.push_back("hvc1.1.6.L93.B0"); |
| 131 invalid_codecs_.push_back("hev1.1.6.L93.B0"); | 129 invalid_codecs_.push_back("hev1.1.6.L93.B0"); |
| 132 #endif | 130 #endif |
| 133 | 131 |
| 132 // Codecs allowed by both MP4 and WebM (with given command line flags). |
| 133 video_common_codecs_.push_back("vp09.00.10.08"); |
| 134 |
| 134 // Extended codecs are used, so make sure generic ones fail. These will be | 135 // Extended codecs are used, so make sure generic ones fail. These will be |
| 135 // tested against all initDataTypes as they should always fail to be | 136 // tested against all initDataTypes as they should always fail to be |
| 136 // supported. | 137 // supported. |
| 137 invalid_codecs_.push_back("avc1"); | 138 invalid_codecs_.push_back("avc1"); |
| 138 invalid_codecs_.push_back("avc1."); | 139 invalid_codecs_.push_back("avc1."); |
| 139 invalid_codecs_.push_back("avc3"); | 140 invalid_codecs_.push_back("avc3"); |
| 140 | 141 |
| 141 // Other invalid codecs. | 142 // Other invalid codecs. |
| 142 invalid_codecs_.push_back("vp8.1"); | 143 invalid_codecs_.push_back("vp8.1"); |
| 143 invalid_codecs_.push_back("mp4a"); | 144 invalid_codecs_.push_back("mp4a"); |
| 144 invalid_codecs_.push_back("avc2"); | 145 invalid_codecs_.push_back("avc2"); |
| 145 invalid_codecs_.push_back("foo"); | 146 invalid_codecs_.push_back("foo"); |
| 146 | 147 |
| 147 // We only support proper long-form HEVC codec ids. | 148 // We only support proper long-form HEVC codec ids. |
| 148 invalid_codecs_.push_back("hev1"); | 149 invalid_codecs_.push_back("hev1"); |
| 149 invalid_codecs_.push_back("hev1."); | 150 invalid_codecs_.push_back("hev1."); |
| 150 invalid_codecs_.push_back("hvc1"); | 151 invalid_codecs_.push_back("hvc1"); |
| 151 invalid_codecs_.push_back("hvc1."); | 152 invalid_codecs_.push_back("hvc1."); |
| 152 } | 153 } |
| 153 | 154 |
| 154 void SetUpCommandLine(base::CommandLine* command_line) override { | 155 void SetUpCommandLine(base::CommandLine* command_line) override { |
| 155 InProcessBrowserTest::SetUpCommandLine(command_line); | 156 InProcessBrowserTest::SetUpCommandLine(command_line); |
| 156 command_line->AppendSwitch(switches::kEnableVp9InMp4); | 157 command_line->AppendSwitch(switches::kEnableVp9InMp4); |
| 158 command_line->AppendSwitch(switches::kEnableNewVp9CodecString); |
| 157 } | 159 } |
| 158 | 160 |
| 159 typedef std::vector<std::string> CodecVector; | 161 typedef std::vector<std::string> CodecVector; |
| 160 | 162 |
| 161 const CodecVector& no_codecs() const { return no_codecs_; } | 163 const CodecVector& no_codecs() const { return no_codecs_; } |
| 164 const CodecVector& video_common_codecs() const { |
| 165 return video_common_codecs_; |
| 166 } |
| 162 const CodecVector& audio_webm_codecs() const { return audio_webm_codecs_; } | 167 const CodecVector& audio_webm_codecs() const { return audio_webm_codecs_; } |
| 163 const CodecVector& video_webm_codecs() const { return video_webm_codecs_; } | 168 const CodecVector& video_webm_codecs() const { return video_webm_codecs_; } |
| 164 const CodecVector& audio_mp4_codecs() const { return audio_mp4_codecs_; } | 169 const CodecVector& audio_mp4_codecs() const { return audio_mp4_codecs_; } |
| 165 const CodecVector& video_mp4_codecs() const { return video_mp4_codecs_; } | 170 const CodecVector& video_mp4_codecs() const { return video_mp4_codecs_; } |
| 166 const CodecVector& video_mp4_hi10p_codecs() const { | 171 const CodecVector& video_mp4_hi10p_codecs() const { |
| 167 return video_mp4_hi10p_codecs_; | 172 return video_mp4_hi10p_codecs_; |
| 168 } | 173 } |
| 169 const CodecVector& invalid_codecs() const { return invalid_codecs_; } | 174 const CodecVector& invalid_codecs() const { return invalid_codecs_; } |
| 170 | 175 |
| 171 #if BUILDFLAG(ENABLE_PEPPER_CDMS) | 176 #if BUILDFLAG(ENABLE_PEPPER_CDMS) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 command); | 267 command); |
| 263 } | 268 } |
| 264 | 269 |
| 265 private: | 270 private: |
| 266 const CodecVector no_codecs_; | 271 const CodecVector no_codecs_; |
| 267 CodecVector audio_webm_codecs_; | 272 CodecVector audio_webm_codecs_; |
| 268 CodecVector video_webm_codecs_; | 273 CodecVector video_webm_codecs_; |
| 269 CodecVector audio_mp4_codecs_; | 274 CodecVector audio_mp4_codecs_; |
| 270 CodecVector video_mp4_codecs_; | 275 CodecVector video_mp4_codecs_; |
| 271 CodecVector video_mp4_hi10p_codecs_; | 276 CodecVector video_mp4_hi10p_codecs_; |
| 277 CodecVector video_common_codecs_; |
| 272 CodecVector invalid_codecs_; | 278 CodecVector invalid_codecs_; |
| 273 }; | 279 }; |
| 274 | 280 |
| 275 // For ClearKey, nothing additional is required. | 281 // For ClearKey, nothing additional is required. |
| 276 class EncryptedMediaSupportedTypesClearKeyTest | 282 class EncryptedMediaSupportedTypesClearKeyTest |
| 277 : public EncryptedMediaSupportedTypesTest { | 283 : public EncryptedMediaSupportedTypesTest { |
| 278 }; | 284 }; |
| 279 | 285 |
| 280 // For ExternalClearKey tests, ensure that the ClearKey adapter is loaded. | 286 // For ExternalClearKey tests, ensure that the ClearKey adapter is loaded. |
| 281 class EncryptedMediaSupportedTypesExternalClearKeyTest | 287 class EncryptedMediaSupportedTypesExternalClearKeyTest |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 403 |
| 398 // There are no child key systems for Clear Key. | 404 // There are no child key systems for Clear Key. |
| 399 EXPECT_UNKNOWN_KEYSYSTEM(AreCodecsSupportedByKeySystem( | 405 EXPECT_UNKNOWN_KEYSYSTEM(AreCodecsSupportedByKeySystem( |
| 400 kVideoWebMMimeType, video_webm_codecs(), "org.w3.clearkey.foo")); | 406 kVideoWebMMimeType, video_webm_codecs(), "org.w3.clearkey.foo")); |
| 401 } | 407 } |
| 402 | 408 |
| 403 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest, Video_WebM) { | 409 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest, Video_WebM) { |
| 404 // Valid video types. | 410 // Valid video types. |
| 405 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem( | 411 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem( |
| 406 kVideoWebMMimeType, video_webm_codecs(), kClearKey)); | 412 kVideoWebMMimeType, video_webm_codecs(), kClearKey)); |
| 413 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem( |
| 414 kVideoWebMMimeType, video_common_codecs(), kClearKey)); |
| 407 | 415 |
| 408 // Non-video WebM codecs. | 416 // Non-video WebM codecs. |
| 409 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( | 417 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 410 kVideoWebMMimeType, audio_webm_codecs(), kClearKey)); | 418 kVideoWebMMimeType, audio_webm_codecs(), kClearKey)); |
| 411 | 419 |
| 412 // Invalid or non-Webm video codecs. | 420 // Invalid or non-Webm video codecs. |
| 413 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( | 421 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 414 kVideoWebMMimeType, invalid_codecs(), kClearKey)); | 422 kVideoWebMMimeType, invalid_codecs(), kClearKey)); |
| 415 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( | 423 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 416 kVideoWebMMimeType, audio_mp4_codecs(), kClearKey)); | 424 kVideoWebMMimeType, audio_mp4_codecs(), kClearKey)); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 433 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( | 441 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 434 kAudioWebMMimeType, audio_mp4_codecs(), kClearKey)); | 442 kAudioWebMMimeType, audio_mp4_codecs(), kClearKey)); |
| 435 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( | 443 EXPECT_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 436 kAudioWebMMimeType, video_mp4_codecs(), kClearKey)); | 444 kAudioWebMMimeType, video_mp4_codecs(), kClearKey)); |
| 437 } | 445 } |
| 438 | 446 |
| 439 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest, Video_MP4) { | 447 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesClearKeyTest, Video_MP4) { |
| 440 // Valid video types. | 448 // Valid video types. |
| 441 EXPECT_PROPRIETARY(AreCodecsSupportedByKeySystem( | 449 EXPECT_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 442 kVideoMP4MimeType, video_mp4_codecs(), kClearKey)); | 450 kVideoMP4MimeType, video_mp4_codecs(), kClearKey)); |
| 451 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem( |
| 452 kVideoWebMMimeType, video_common_codecs(), kClearKey)); |
| 443 | 453 |
| 444 // High 10-bit Profile is supported when using ClearKey if | 454 // High 10-bit Profile is supported when using ClearKey if |
| 445 // it is supported for clear content on this platform. | 455 // it is supported for clear content on this platform. |
| 446 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) | 456 #if !defined(MEDIA_DISABLE_FFMPEG) && !defined(OS_ANDROID) |
| 447 EXPECT_PROPRIETARY(AreCodecsSupportedByKeySystem( | 457 EXPECT_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 448 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kClearKey)); | 458 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kClearKey)); |
| 449 #else | 459 #else |
| 450 EXPECT_NO_MATCh(AreCodecsSupportedByKeySystem( | 460 EXPECT_NO_MATCh(AreCodecsSupportedByKeySystem( |
| 451 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kClearKey)); | 461 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kClearKey)); |
| 452 #endif | 462 #endif |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 EXPECT_UNKNOWN_KEYSYSTEM( | 551 EXPECT_UNKNOWN_KEYSYSTEM( |
| 542 AreCodecsSupportedByKeySystem(kVideoWebMMimeType, video_webm_codecs(), | 552 AreCodecsSupportedByKeySystem(kVideoWebMMimeType, video_webm_codecs(), |
| 543 "org.chromium.externalclearkey.foo")); | 553 "org.chromium.externalclearkey.foo")); |
| 544 } | 554 } |
| 545 | 555 |
| 546 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest, | 556 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest, |
| 547 Video_WebM) { | 557 Video_WebM) { |
| 548 // Valid video types. | 558 // Valid video types. |
| 549 EXPECT_ECK(AreCodecsSupportedByKeySystem( | 559 EXPECT_ECK(AreCodecsSupportedByKeySystem( |
| 550 kVideoWebMMimeType, video_webm_codecs(), kExternalClearKey)); | 560 kVideoWebMMimeType, video_webm_codecs(), kExternalClearKey)); |
| 561 EXPECT_ECK(AreCodecsSupportedByKeySystem( |
| 562 kVideoWebMMimeType, video_common_codecs(), kExternalClearKey)); |
| 551 | 563 |
| 552 // Non-video WebM codecs. | 564 // Non-video WebM codecs. |
| 553 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( | 565 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 554 kVideoWebMMimeType, audio_webm_codecs(), kExternalClearKey)); | 566 kVideoWebMMimeType, audio_webm_codecs(), kExternalClearKey)); |
| 555 | 567 |
| 556 // Invalid or non-Webm codecs. | 568 // Invalid or non-Webm codecs. |
| 557 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( | 569 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 558 kVideoWebMMimeType, invalid_codecs(), kExternalClearKey)); | 570 kVideoWebMMimeType, invalid_codecs(), kExternalClearKey)); |
| 559 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( | 571 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 560 kVideoWebMMimeType, audio_mp4_codecs(), kExternalClearKey)); | 572 kVideoWebMMimeType, audio_mp4_codecs(), kExternalClearKey)); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 579 kAudioWebMMimeType, audio_mp4_codecs(), kExternalClearKey)); | 591 kAudioWebMMimeType, audio_mp4_codecs(), kExternalClearKey)); |
| 580 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( | 592 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 581 kAudioWebMMimeType, video_mp4_codecs(), kExternalClearKey)); | 593 kAudioWebMMimeType, video_mp4_codecs(), kExternalClearKey)); |
| 582 } | 594 } |
| 583 | 595 |
| 584 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest, | 596 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesExternalClearKeyTest, |
| 585 Video_MP4) { | 597 Video_MP4) { |
| 586 // Valid video types. | 598 // Valid video types. |
| 587 EXPECT_ECK_PROPRIETARY(AreCodecsSupportedByKeySystem( | 599 EXPECT_ECK_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 588 kVideoMP4MimeType, video_mp4_codecs(), kExternalClearKey)); | 600 kVideoMP4MimeType, video_mp4_codecs(), kExternalClearKey)); |
| 601 EXPECT_ECK(AreCodecsSupportedByKeySystem( |
| 602 kVideoWebMMimeType, video_common_codecs(), kExternalClearKey)); |
| 589 | 603 |
| 590 // High 10-bit Profile is not supported when using ExternalClearKey. | 604 // High 10-bit Profile is not supported when using ExternalClearKey. |
| 591 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( | 605 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 592 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kExternalClearKey)); | 606 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kExternalClearKey)); |
| 593 | 607 |
| 594 // Non-video MP4 codecs. | 608 // Non-video MP4 codecs. |
| 595 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( | 609 EXPECT_ECK_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 596 kVideoMP4MimeType, audio_mp4_codecs(), kExternalClearKey)); | 610 kVideoMP4MimeType, audio_mp4_codecs(), kExternalClearKey)); |
| 597 | 611 |
| 598 // Invalid or non-MP4 codecs. | 612 // Invalid or non-MP4 codecs. |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 641 | 655 |
| 642 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Basic) { | 656 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Basic) { |
| 643 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( | 657 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( |
| 644 kVideoWebMMimeType, video_webm_codecs(), kWidevine)); | 658 kVideoWebMMimeType, video_webm_codecs(), kWidevine)); |
| 645 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( | 659 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( |
| 646 kAudioWebMMimeType, audio_webm_codecs(), kWidevine)); | 660 kAudioWebMMimeType, audio_webm_codecs(), kWidevine)); |
| 647 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( | 661 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 648 kVideoMP4MimeType, video_mp4_codecs(), kWidevine)); | 662 kVideoMP4MimeType, video_mp4_codecs(), kWidevine)); |
| 649 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( | 663 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 650 kAudioMP4MimeType, audio_mp4_codecs(), kWidevine)); | 664 kAudioMP4MimeType, audio_mp4_codecs(), kWidevine)); |
| 665 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 666 kAudioMP4MimeType, video_common_codecs(), kWidevine)); |
| 651 } | 667 } |
| 652 | 668 |
| 653 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, NoCodecs) { | 669 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, NoCodecs) { |
| 654 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(kVideoWebMMimeType, | 670 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(kVideoWebMMimeType, |
| 655 no_codecs(), kWidevine)); | 671 no_codecs(), kWidevine)); |
| 656 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(kAudioWebMMimeType, | 672 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem(kAudioWebMMimeType, |
| 657 no_codecs(), kWidevine)); | 673 no_codecs(), kWidevine)); |
| 658 EXPECT_WV_NO_MATCH( | 674 EXPECT_WV_NO_MATCH( |
| 659 AreCodecsSupportedByKeySystem(kVideoMP4MimeType, no_codecs(), kWidevine)); | 675 AreCodecsSupportedByKeySystem(kVideoMP4MimeType, no_codecs(), kWidevine)); |
| 660 EXPECT_WV_NO_MATCH( | 676 EXPECT_WV_NO_MATCH( |
| 661 AreCodecsSupportedByKeySystem(kAudioMP4MimeType, no_codecs(), kWidevine)); | 677 AreCodecsSupportedByKeySystem(kAudioMP4MimeType, no_codecs(), kWidevine)); |
| 662 } | 678 } |
| 663 | 679 |
| 664 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_WebM) { | 680 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_WebM) { |
| 665 // Valid video types. | 681 // Valid video types. |
| 666 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( | 682 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( |
| 667 kVideoWebMMimeType, video_webm_codecs(), kWidevine)); | 683 kVideoWebMMimeType, video_webm_codecs(), kWidevine)); |
| 684 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( |
| 685 kVideoWebMMimeType, video_common_codecs(), kWidevine)); |
| 668 | 686 |
| 669 // Non-video WebM codecs. | 687 // Non-video WebM codecs. |
| 670 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 688 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 671 kVideoWebMMimeType, audio_webm_codecs(), kWidevine)); | 689 kVideoWebMMimeType, audio_webm_codecs(), kWidevine)); |
| 672 | 690 |
| 673 // Invalid or non-Webm codecs. | 691 // Invalid or non-Webm codecs. |
| 674 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 692 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 675 kVideoWebMMimeType, invalid_codecs(), kWidevine)); | 693 kVideoWebMMimeType, invalid_codecs(), kWidevine)); |
| 676 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 694 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 677 kVideoWebMMimeType, audio_mp4_codecs(), kWidevine)); | 695 kVideoWebMMimeType, audio_mp4_codecs(), kWidevine)); |
| (...skipping 16 matching lines...) Expand all Loading... |
| 694 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 712 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 695 kAudioWebMMimeType, audio_mp4_codecs(), kWidevine)); | 713 kAudioWebMMimeType, audio_mp4_codecs(), kWidevine)); |
| 696 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 714 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 697 kAudioWebMMimeType, video_mp4_codecs(), kWidevine)); | 715 kAudioWebMMimeType, video_mp4_codecs(), kWidevine)); |
| 698 } | 716 } |
| 699 | 717 |
| 700 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_MP4) { | 718 IN_PROC_BROWSER_TEST_F(EncryptedMediaSupportedTypesWidevineTest, Video_MP4) { |
| 701 // Valid video types. | 719 // Valid video types. |
| 702 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( | 720 EXPECT_WV_PROPRIETARY(AreCodecsSupportedByKeySystem( |
| 703 kVideoMP4MimeType, video_mp4_codecs(), kWidevine)); | 721 kVideoMP4MimeType, video_mp4_codecs(), kWidevine)); |
| 722 EXPECT_WV_SUCCESS(AreCodecsSupportedByKeySystem( |
| 723 kVideoWebMMimeType, video_common_codecs(), kWidevine)); |
| 704 | 724 |
| 705 // High 10-bit Profile is not supported when using Widevine. | 725 // High 10-bit Profile is not supported when using Widevine. |
| 706 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 726 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 707 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kWidevine)); | 727 kVideoMP4MimeType, video_mp4_hi10p_codecs(), kWidevine)); |
| 708 | 728 |
| 709 // Non-video MP4 codecs. | 729 // Non-video MP4 codecs. |
| 710 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( | 730 EXPECT_WV_NO_MATCH(AreCodecsSupportedByKeySystem( |
| 711 kVideoMP4MimeType, audio_mp4_codecs(), kWidevine)); | 731 kVideoMP4MimeType, audio_mp4_codecs(), kWidevine)); |
| 712 | 732 |
| 713 // Invalid or non-MP4 codecs. | 733 // Invalid or non-MP4 codecs. |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 kVideoWebMMimeType, video_webm_codecs(), kWidevine)); | 800 kVideoWebMMimeType, video_webm_codecs(), kWidevine)); |
| 781 | 801 |
| 782 // Clear Key should still be registered. | 802 // Clear Key should still be registered. |
| 783 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem(kVideoWebMMimeType, | 803 EXPECT_SUCCESS(AreCodecsSupportedByKeySystem(kVideoWebMMimeType, |
| 784 video_webm_codecs(), kClearKey)); | 804 video_webm_codecs(), kClearKey)); |
| 785 } | 805 } |
| 786 #endif // !defined(WIDEVINE_CDM_AVAILABLE) | 806 #endif // !defined(WIDEVINE_CDM_AVAILABLE) |
| 787 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) | 807 #endif // BUILDFLAG(ENABLE_PEPPER_CDMS) |
| 788 | 808 |
| 789 } // namespace chrome | 809 } // namespace chrome |
| OLD | NEW |