Commit b541cc6a authored by Yuchen Liu's avatar Yuchen Liu Committed by Commit Bot

[Chromecast] ClearKey test

Add ClearKey test. ClearKey is handled in renderer process. It should be
supported on all the cast builds.

Bug: internal b/119043784
Test: CQ
Change-Id: I736cb4a6e863d3d92a5c31ab259624b395f550d5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2155246
Commit-Queue: Yuchen Liu <yucliu@chromium.org>
Commit-Queue: Sean Topping <seantopping@chromium.org>
Auto-Submit: Yuchen Liu <yucliu@chromium.org>
Reviewed-by: default avatarSean Topping <seantopping@chromium.org>
Cr-Commit-Position: refs/heads/master@{#760214}
parent 48afb435
......@@ -18,6 +18,9 @@ namespace {
const char kEnded[] = "ENDED";
const char kError[] = "ERROR";
const char kFailed[] = "FAILED";
const char kClearKeyKeySystem[] = "org.w3.clearkey";
const char kWebMAudioOnly[] = "audio/webm; codecs=\"vorbis\"";
}
class CastNavigationBrowserTest : public CastBrowserTest {
......@@ -38,6 +41,17 @@ class CastNavigationBrowserTest : public CastBrowserTest {
void PlayVideo(const std::string& media_file) {
PlayMedia("video", media_file);
}
void PlayEncryptedMedia(const std::string& key_system,
const std::string& media_type,
const std::string& media_file) {
base::StringPairs query_params;
query_params.emplace_back("mediaFile", media_file);
query_params.emplace_back("mediaType", media_type);
query_params.emplace_back("keySystem", key_system);
query_params.emplace_back("useMSE", "1");
RunMediaTestPage("eme_player.html", query_params, kEnded);
}
private:
void PlayMedia(const std::string& tag, const std::string& media_file) {
......@@ -89,5 +103,9 @@ IN_PROC_BROWSER_TEST_F(CastNavigationBrowserTest, DISABLED_VideoPlaybackMp4) {
}
#endif
IN_PROC_BROWSER_TEST_F(CastNavigationBrowserTest, ClearKeySupport) {
PlayEncryptedMedia(kClearKeyKeySystem, kWebMAudioOnly, "bear-a_enc-a.webm");
}
} // namespace shell
} // namespace chromecast
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment