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 // TODO(jrummell): Merge with ECKEncryptedMediaTest once unprefixed is | |
338 // enabled by default. | |
339 class ECKUnprefixedEncryptedMediaTest : public EncryptedMediaTestBase { | |
340 protected: | |
341 virtual void SetUpCommandLine(CommandLine* command_line) override { | |
342 EncryptedMediaTestBase::SetUpCommandLine(command_line); | |
343 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | |
344 SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line); | |
345 } | |
346 }; | |
347 | |
348 #if defined(WIDEVINE_CDM_AVAILABLE) | 335 #if defined(WIDEVINE_CDM_AVAILABLE) |
349 // Tests encrypted media playback using Widevine key system. | 336 // Tests encrypted media playback using Widevine key system. |
350 class WVEncryptedMediaTest : public EncryptedMediaTestBase { | 337 class WVEncryptedMediaTest : public EncryptedMediaTestBase { |
351 protected: | 338 protected: |
352 virtual void SetUpCommandLine(CommandLine* command_line) override { | 339 virtual void SetUpCommandLine(CommandLine* command_line) override { |
353 EncryptedMediaTestBase::SetUpCommandLine(command_line); | 340 EncryptedMediaTestBase::SetUpCommandLine(command_line); |
354 command_line->AppendSwitch(switches::kEnableEncryptedMedia); | 341 command_line->AppendSwitch(switches::kEnableEncryptedMedia); |
355 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line); | 342 SetUpCommandLineForKeySystem(kWidevineKeySystem, command_line); |
356 } | 343 } |
357 }; | 344 }; |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 RunEncryptedMediaTest(kDefaultEmePlayer, | 659 RunEncryptedMediaTest(kDefaultEmePlayer, |
673 "bear-320x240-v_enc-v.webm", | 660 "bear-320x240-v_enc-v.webm", |
674 kWebMVideoOnly, | 661 kWebMVideoOnly, |
675 kExternalClearKeyKeySystem, | 662 kExternalClearKeyKeySystem, |
676 SRC, | 663 SRC, |
677 PREFIXED, | 664 PREFIXED, |
678 kUnknownSession, | 665 kUnknownSession, |
679 false, | 666 false, |
680 kEmeKeyError); | 667 kEmeKeyError); |
681 } | 668 } |
682 | |
683 IN_PROC_BROWSER_TEST_F(ECKUnprefixedEncryptedMediaTest, LoadLoadableSession) { | |
684 RunEncryptedMediaTest(kDefaultEmePlayer, | |
685 "bear-320x240-v_enc-v.webm", | |
686 kWebMVideoOnly, | |
687 kExternalClearKeyKeySystem, | |
688 SRC, | |
689 UNPREFIXED, | |
690 kLoadableSession, | |
691 false, | |
692 kEnded); | |
693 } | |
694 | |
695 IN_PROC_BROWSER_TEST_F(ECKUnprefixedEncryptedMediaTest, LoadUnknownSession) { | |
696 // TODO(xhwang): Add a specific error for this failure, e.g. kSessionNotFound. | |
697 RunEncryptedMediaTest(kDefaultEmePlayer, | |
698 "bear-320x240-v_enc-v.webm", | |
699 kWebMVideoOnly, | |
700 kExternalClearKeyKeySystem, | |
701 SRC, | |
702 UNPREFIXED, | |
703 kUnknownSession, | |
704 false, | |
705 kEmeKeyError); | |
706 } | |
707 #endif // defined(ENABLE_PEPPER_CDMS) | 669 #endif // defined(ENABLE_PEPPER_CDMS) |
OLD | NEW |