#include <string>
#include <string_view>
#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/strings/string_split.h"
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/shell/browser/shell.h"
#include "media/base/media_switches.h"
#include "media/base/test_data_util.h"
namespace {
constexpr std::string_view kDecodeTestFile = …;
constexpr std::string_view kSupported = …;
constexpr std::u16string_view kSupported16 = …;
constexpr std::string_view kUnsupported = …;
constexpr std::u16string_view kUnsupported16 = …;
constexpr std::string_view kError = …;
constexpr std::u16string_view kError16 = …;
constexpr std::string_view kFileString = …;
constexpr std::string_view kMediaSourceString = …;
constexpr std::string_view kWebRtcString = …;
constexpr std::string_view kInvalid = …;
#if BUILDFLAG(USE_PROPRIETARY_CODECS)
constexpr std::string_view kPropSupported = kSupported;
#else
constexpr std::string_view kPropSupported = …;
#endif
enum StreamType { … };
enum ConfigType { … };
}
namespace content {
class MediaCapabilitiesTest : public ContentBrowserTest { … };
class MediaCapabilitiesTestWithConfigType
: public MediaCapabilitiesTest,
public testing::WithParamInterface<ConfigType> { … };
IN_PROC_BROWSER_TEST_P(MediaCapabilitiesTestWithConfigType,
CommonVideoDecodeTypes) { … }
IN_PROC_BROWSER_TEST_P(MediaCapabilitiesTestWithConfigType,
CommonAudioDecodeTypes) { … }
IN_PROC_BROWSER_TEST_P(MediaCapabilitiesTestWithConfigType,
NonMediaSourceDecodeTypes) { … }
IN_PROC_BROWSER_TEST_P(MediaCapabilitiesTestWithConfigType,
AudioTypesWithSpatialRendering) { … }
IN_PROC_BROWSER_TEST_P(MediaCapabilitiesTestWithConfigType,
VideoTypesWithDynamicRange) { … }
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
}