chromium/content/browser/media/media_color_browsertest.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/media/media_browsertest.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "media/base/media_switches.h"
#include "media/base/test_data_util.h"
#include "media/media_buildflags.h"

namespace content {

class MediaColorTest : public MediaBrowserTest {};

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pVp8) {}

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pVp9) {}

IN_PROC_BROWSER_TEST_F(MediaColorTest, GbrpVp9) {}

// Fuchsia isn't able to playback 4:4:4 av1.
#if !BUILDFLAG(IS_FUCHSIA)
IN_PROC_BROWSER_TEST_F(MediaColorTest, GbrpAv1) {}
#endif

#if BUILDFLAG(USE_PROPRIETARY_CODECS) && BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pH264) {
  RunBlackWhiteTest("yuv420p.mp4");
}

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuvj420pH264) {
  RunBlackWhiteTest("yuvj420p.mp4");
}

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pRec709H264) {
  RunBlackWhiteTest("yuv420p_rec709.mp4");
}

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv420pHighBitDepth) {
  RunBlackWhiteTest("yuv420p_hi10p.mp4");
}

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv422pH264) {
  RunBlackWhiteTest("yuv422p.mp4");
}

IN_PROC_BROWSER_TEST_F(MediaColorTest, Yuv444pH264) {
  RunBlackWhiteTest("yuv444p.mp4");
}

// TODO(crbug.com/343014700): Add GbrpH265 test for H265 after resolving
// color space full range issue on macOS, and validate HEVC 4:4:4 + GBR
// video on Windows is working as expected.
IN_PROC_BROWSER_TEST_F(MediaColorTest, GbrpH264) {
  RunGBRPTest("h264.mp4");
}

#endif  // BUILDFLAG(USE_PROPRIETARY_CODECS) &&
        // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS)

}  // namespace content