Commit 412f817a authored by sandersd's avatar sandersd Committed by Commit bot

Fix encrypted-media-requestmediakeysystemaccess Layout Test.

BUG=470754

Review URL: https://codereview.chromium.org/1036513007

Cr-Commit-Position: refs/heads/master@{#322310}
parent 91dd3606
...@@ -136,8 +136,9 @@ static bool IsSupportedContentType( ...@@ -136,8 +136,9 @@ static bool IsSupportedContentType(
// parameters can be rejected. http://crbug.com/417561 // parameters can be rejected. http://crbug.com/417561
std::string container_lower = base::StringToLowerASCII(container_mime_type); std::string container_lower = base::StringToLowerASCII(container_mime_type);
// Check that |codecs| are supported by the CDM. This check does not handle // Check that |container_mime_type| and |codecs| are supported by the CDM.
// extended codecs, so extended codec information is stripped. // This check does not handle extended codecs, so extended codec information
// is stripped.
std::vector<std::string> codec_vector; std::vector<std::string> codec_vector;
net::ParseCodecString(codecs, &codec_vector, true); net::ParseCodecString(codecs, &codec_vector, true);
if (!key_systems.IsSupportedCodecCombination( if (!key_systems.IsSupportedCodecCombination(
...@@ -145,11 +146,13 @@ static bool IsSupportedContentType( ...@@ -145,11 +146,13 @@ static bool IsSupportedContentType(
return false; return false;
} }
if (codec_vector.empty())
return true;
// Check that |codecs| are supported by Chrome. This is done primarily to // Check that |codecs| are supported by Chrome. This is done primarily to
// validate extended codecs, but it also ensures that the CDM cannot support // validate extended codecs, but it also ensures that the CDM cannot support
// codecs that Chrome does not (which would be bad because it would require // codecs that Chrome does not (which could complicate the robustness
// considering the accumulated configuration, and could affect whether secure // algorithm).
// decode is required).
codec_vector.clear(); codec_vector.clear();
net::ParseCodecString(codecs, &codec_vector, false); net::ParseCodecString(codecs, &codec_vector, false);
return (net::IsSupportedStrictMediaMimeType(container_lower, codec_vector) == return (net::IsSupportedStrictMediaMimeType(container_lower, codec_vector) ==
......
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