#include "media/filters/fake_video_decoder.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "media/base/decoder_buffer.h"
#include "media/base/mock_filters.h"
#include "media/base/test_helpers.h"
#include "media/base/video_frame.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace media {
static const int kTotalBuffers = …;
static const int kDurationMs = …;
struct FakeVideoDecoderTestParams { … };
class FakeVideoDecoderTest
: public testing::Test,
public testing::WithParamInterface<FakeVideoDecoderTestParams> { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(FakeVideoDecoderTest, Initialize) { … }
TEST_P(FakeVideoDecoderTest, SimulateFailureToInitialize) { … }
TEST_P(FakeVideoDecoderTest, Read_AllFrames) { … }
TEST_P(FakeVideoDecoderTest, Read_DecodingDelay) { … }
TEST_P(FakeVideoDecoderTest, Read_ZeroDelay) { … }
TEST_P(FakeVideoDecoderTest, Read_Pending_NotEnoughData) { … }
TEST_P(FakeVideoDecoderTest, Read_Pending_OK) { … }
TEST_P(FakeVideoDecoderTest, Read_Parallel) { … }
TEST_P(FakeVideoDecoderTest, ReadWithHold_DecodingDelay) { … }
TEST_P(FakeVideoDecoderTest, Reinitialize) { … }
TEST_P(FakeVideoDecoderTest, SimulateFailureToReinitialize) { … }
TEST_P(FakeVideoDecoderTest, Reinitialize_FrameDropped) { … }
TEST_P(FakeVideoDecoderTest, Reset) { … }
TEST_P(FakeVideoDecoderTest, Reset_DuringPendingRead) { … }
TEST_P(FakeVideoDecoderTest, Reset_Pending) { … }
TEST_P(FakeVideoDecoderTest, Reset_PendingDuringPendingRead) { … }
TEST_P(FakeVideoDecoderTest, Destroy) { … }
TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingInitialization) { … }
TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingRead) { … }
TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingReset) { … }
TEST_P(FakeVideoDecoderTest, Destroy_DuringPendingReadAndPendingReset) { … }
}