Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5308)

Unified Diff: chrome/browser/media/encrypted_media_browsertest.cc

Issue 642813012: Reland "Add unprefixed EME tests for LoadSession()" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git/+/master
Patch Set: rebase Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/encrypted_media_browsertest.cc
diff --git a/chrome/browser/media/encrypted_media_browsertest.cc b/chrome/browser/media/encrypted_media_browsertest.cc
index bd6cd7d09f256cc3f1a7c66801b6d7bf1b52e521..da9f0c0cc2c55424954d17760afc1a6b299a0882 100644
--- a/chrome/browser/media/encrypted_media_browsertest.cc
+++ b/chrome/browser/media/encrypted_media_browsertest.cc
@@ -332,6 +332,19 @@ class ECKEncryptedMediaTest : public EncryptedMediaTestBase {
}
};
+// Tests encrypted media playback using ExternalClearKey key system in
+// decrypt-and-decode mode for unprefixed EME.
+// TODO(jrummell): Merge with ECKEncryptedMediaTest once unprefixed is
+// enabled by default.
+class ECKUnprefixedEncryptedMediaTest : public EncryptedMediaTestBase {
+ protected:
+ virtual void SetUpCommandLine(CommandLine* command_line) override {
+ EncryptedMediaTestBase::SetUpCommandLine(command_line);
+ command_line->AppendSwitch(switches::kEnableEncryptedMedia);
+ SetUpCommandLineForKeySystem(kExternalClearKeyKeySystem, command_line);
+ }
+};
+
#if defined(WIDEVINE_CDM_AVAILABLE)
// Tests encrypted media playback using Widevine key system.
class WVEncryptedMediaTest : public EncryptedMediaTestBase {
@@ -666,4 +679,29 @@ IN_PROC_BROWSER_TEST_F(ECKEncryptedMediaTest, LoadUnknownSession) {
false,
kEmeKeyError);
}
+
+IN_PROC_BROWSER_TEST_F(ECKUnprefixedEncryptedMediaTest, LoadLoadableSession) {
+ RunEncryptedMediaTest(kDefaultEmePlayer,
+ "bear-320x240-v_enc-v.webm",
+ kWebMVideoOnly,
+ kExternalClearKeyKeySystem,
+ SRC,
+ UNPREFIXED,
+ kLoadableSession,
+ false,
+ kEnded);
+}
+
+IN_PROC_BROWSER_TEST_F(ECKUnprefixedEncryptedMediaTest, LoadUnknownSession) {
+ // TODO(xhwang): Add a specific error for this failure, e.g. kSessionNotFound.
+ RunEncryptedMediaTest(kDefaultEmePlayer,
+ "bear-320x240-v_enc-v.webm",
+ kWebMVideoOnly,
+ kExternalClearKeyKeySystem,
+ SRC,
+ UNPREFIXED,
+ kUnknownSession,
+ false,
+ kEmeKeyError);
+}
#endif // defined(ENABLE_PEPPER_CDMS)
« no previous file with comments | « no previous file | content/browser/media/encrypted_media_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698