Commit 6114a3e4 authored by Xiaohan Wang's avatar Xiaohan Wang Committed by Commit Bot

media: Clean up feature enabling in EncryptedMediaTestBase

Now ScopedFeatureList::InitWithFeatures() takes vectors instead of
initializer_lists, we can make this much simpler.

Change-Id: Iaa807df1873ce5bf4215d1523dd53de4b0819b7f
Reviewed-on: https://chromium-review.googlesource.com/964934Reviewed-by: default avatarJohn Rummell <jrummell@chromium.org>
Commit-Queue: Xiaohan Wang <xhwang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544186}
parent ff5eab5c
......@@ -301,18 +301,11 @@ class EncryptedMediaTestBase : public MediaBrowserTest {
#if BUILDFLAG(ENABLE_LIBRARY_CDMS)
if (IsExternalClearKey(key_system)) {
RegisterClearKeyCdm(command_line);
// TODO(xhwang): Update ScopedFeatureList::InitWithFeatures() to accept
// vectors so that we can simplify this block.
if (support_experimental_cdm_interface) {
scoped_feature_list_.InitWithFeatures(
{media::kExternalClearKeyForTesting,
media::kSupportExperimentalCdmInterface},
{});
} else {
scoped_feature_list_.InitWithFeatures(
{media::kExternalClearKeyForTesting}, {});
}
std::vector<base::Feature> enabled_features = {
media::kExternalClearKeyForTesting};
if (support_experimental_cdm_interface)
enabled_features.push_back(media::kSupportExperimentalCdmInterface);
scoped_feature_list_.InitWithFeatures(enabled_features, {});
}
#endif // BUILDFLAG(ENABLE_LIBRARY_CDMS)
}
......
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