1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "remoting/codec/video_encoder_verbatim.h" 6 7 #include "remoting/codec/codec_test.h" 8 #include "remoting/codec/video_decoder_verbatim.h" 9 #include "testing/gtest/include/gtest/gtest.h" 10 11 namespace remoting { 12 13 TEST(VideoEncoderVerbatimTest, TestVideoEncoder) { 14 scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim()); 15 TestVideoEncoder(encoder.get(), true); 16 } 17 18 TEST(VideoEncoderVerbatimTest, TestVideoEncoderSmallOutputBuffer) { 19 scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim()); 20 encoder->SetMaxPacketSize(16); 21 TestVideoEncoder(encoder.get(), true); 22 } 23 24 TEST(VideoEncoderVerbatimTest, EncodeAndDecode) { 25 scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim()); 26 scoped_ptr<VideoDecoderVerbatim> decoder(new VideoDecoderVerbatim()); 27 TestVideoEncoderDecoder(encoder.get(), decoder.get(), false); 28 } 29 30 TEST(VideoEncoderVerbatimTest, EncodeAndDecodeSmallOutputBuffer) { 31 scoped_ptr<VideoEncoderVerbatim> encoder(new VideoEncoderVerbatim()); 32 encoder->SetMaxPacketSize(16); 33 scoped_ptr<VideoDecoderVerbatim> decoder(new VideoDecoderVerbatim()); 34 TestVideoEncoderDecoder(encoder.get(), decoder.get(), false); 35 } 36 37 } // namespace remoting 38