chromium/remoting/codec/video_encoder_vpx_unittest.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "remoting/codec/video_encoder_vpx.h"

#include <stdint.h>

#include <limits>
#include <memory>
#include <vector>

#include "remoting/codec/codec_test.h"
#include "remoting/proto/video.pb.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"

namespace remoting {

// xRGB pixel colors for use by tests.
const uint32_t kBlueColor =;
const uint32_t kGreenColor =;

// Creates a frame stippled between blue and red pixels, which is useful for
// lossy/lossless color tests. By default all pixels in the frame are included
// in the updated_region().
static std::unique_ptr<webrtc::DesktopFrame> CreateTestFrame(
    const webrtc::DesktopSize& frame_size) {}

TEST(VideoEncoderVpxTest, Vp8) {}

TEST(VideoEncoderVpxTest, Vp9) {}

// Test that the VP9 encoder can switch between lossy & lossless color.
TEST(VideoEncoderVpxTest, Vp9LossyColorSwitching) {}

// Test that the VP8 encoder ignores lossless modes without crashing.
TEST(VideoEncoderVpxTest, Vp8IgnoreLossy) {}

// Test that calling Encode with a larger frame size than the initial one
// does not cause VP8 to crash.
TEST(VideoEncoderVpxTest, Vp8SizeChangeNoCrash) {}

// Test that calling Encode with a larger frame size than the initial one
// does not cause VP9 to crash.
TEST(VideoEncoderVpxTest, Vp9SizeChangeNoCrash) {}

// Test that the DPI information is correctly propagated from the
// webrtc::DesktopFrame to the VideoPacket.
TEST(VideoEncoderVpxTest, DpiPropagation) {}

TEST(VideoEncoderVpxTest, Vp8EncodeUnchangedFrame) {}

TEST(VideoEncoderVpxTest, Vp9LossyUnchangedFrame) {}

}  // namespace remoting