Chromium Code Reviews| 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 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 325 expected_title); | 325 expected_title); |
| 326 } | 326 } |
| 327 | 327 |
| 328 protected: | 328 protected: |
| 329 virtual void SetUpCommandLine(CommandLine* command_line) override { | 329 virtual void SetUpCommandLine(CommandLine* command_line) override { |
| 330 EncryptedMediaTestBase::SetUpCommandLine(command_line); | 330 EncryptedMediaTestBase::SetUpCommandLine(command_line); |
| 331 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line); | 331 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line); |
| 332 } | 332 } |
| 333 }; | 333 }; |
| 334 | 334 |
| 335 // Tests encrypted media playback using ExternalClearKey key system in | |
| 336 // decrypt-and-decode mode for unprefixed EME. | |
| 337 class ECKUnprefixedEncryptedMediaTest : public EncryptedMediaTestBase { | |
|
ddorwin
2014/10/08 22:04:28
TODO: Merge with ECKEncryptedMediaTest once unpref
jrummell
2014/10/16 18:53:58
Done.
| |
| 338 protected: | |
| 339 virtual void SetUpCommandLine(CommandLine* command_line) override { | |
| 340 EncryptedMediaTestBase::SetUpCommandLine(command_line); | |
| 341 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | |
| 342 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line); | |
| 343 } | |
| 344 }; | |
| 345 | |
| 335 #if defined(WIDEVINE_CDM_AVAILABLE) | 346 #if defined(WIDEVINE_CDM_AVAILABLE) |
| 336 // Tests encrypted media playback using Widevine key system. | 347 // Tests encrypted media playback using Widevine key system. |
| 337 class WVEncryptedMediaTest : public EncryptedMediaTestBase { | 348 class WVEncryptedMediaTest : public EncryptedMediaTestBase { |
| 338 protected: | 349 protected: |
| 339 virtual void SetUpCommandLine(CommandLine* command_line) override { | 350 virtual void SetUpCommandLine(CommandLine* command_line) override { |
| 340 EncryptedMediaTestBase::SetUpCommandLine(command_line); | 351 EncryptedMediaTestBase::SetUpCommandLine(command_line); |
| 341 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | 352 command_line->AppendSwitch(switches::kEnableEncryptedMedia); |
| 342 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line); | 353 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line); |
| 343 } | 354 } |
| 344 }; | 355 }; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 659 RunEncryptedMediaTest(kDefaultEmePlayer, | 670 RunEncryptedMediaTest(kDefaultEmePlayer, |
| 660 "bear-320x240-v_enc-v.webm", | 671 "bear-320x240-v_enc-v.webm", |
| 661 kWebMVideoOnly, | 672 kWebMVideoOnly, |
| 662 kExternalClearKeyKeySystem, | 673 kExternalClearKeyKeySystem, |
| 663 SRC, | 674 SRC, |
| 664 PREFIXED, | 675 PREFIXED, |
| 665 kUnknownSession, | 676 kUnknownSession, |
| 666 false, | 677 false, |
| 667 kEmeKeyError); | 678 kEmeKeyError); |
| 668 } | 679 } |
| 680 | |
| 681 IN_PROC_BROWSER_TEST_F(ECKUnprefixedEncryptedMediaTest, LoadLoadableSession) { | |
| 682 RunEncryptedMediaTest(kDefaultEmePlayer, | |
| 683 "bear-320x240-v_enc-v.webm", | |
| 684 kWebMVideoOnly, | |
| 685 kExternalClearKeyKeySystem, | |
| 686 SRC, | |
| 687 UNPREFIXED, | |
| 688 kLoadableSession, | |
| 689 false, | |
| 690 kEnded); | |
| 691 } | |
| 692 | |
| 693 IN_PROC_BROWSER_TEST_F(ECKUnprefixedEncryptedMediaTest, LoadUnknownSession) { | |
| 694 // TODO(xhwang): Add a specific error for this failure, e.g. kSessionNotFound. | |
| 695 RunEncryptedMediaTest(kDefaultEmePlayer, | |
| 696 "bear-320x240-v_enc-v.webm", | |
| 697 kWebMVideoOnly, | |
| 698 kExternalClearKeyKeySystem, | |
| 699 SRC, | |
| 700 UNPREFIXED, | |
| 701 kUnknownSession, | |
| 702 false, | |
| 703 kEmeKeyError); | |
| 704 } | |
| 669 #endif // defined(ENABLE_PEPPER_CDMS) | 705 #endif // defined(ENABLE_PEPPER_CDMS) |
| OLD | NEW |