#include <memory>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/task_environment.h"
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/audio_timestamp_helper.h"
#include "media/base/decoder_buffer.h"
#include "media/base/media_util.h"
#include "media/base/mock_filters.h"
#include "media/base/test_helpers.h"
#include "media/base/waiting.h"
#include "media/mojo/clients/mojo_audio_decoder.h"
#include "media/mojo/mojom/audio_decoder.mojom.h"
#include "media/mojo/services/mojo_audio_decoder_service.h"
#include "media/mojo/services/mojo_cdm_service_context.h"
#include "media/mojo/services/mojo_media_client.h"
#include "mojo/public/cpp/bindings/pending_receiver.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/self_owned_receiver.h"
#include "testing/gtest/include/gtest/gtest.h"
RunOnceCallback;
RunOnceCallbackRepeatedly;
_;
DoAll;
InSequence;
InvokeWithoutArgs;
SaveArg;
StrictMock;
namespace media {
const SampleFormat kSampleFormat = …;
const int kChannels = …;
const ChannelLayout kChannelLayout = …;
const int kDefaultSampleRate = …;
const int kDefaultFrameSize = …;
const int kOutputPerDecode = …;
namespace {
class FakeMojoMediaClient : public MojoMediaClient { … };
}
class MojoAudioDecoderTest : public ::testing::Test { … };
TEST_F(MojoAudioDecoderTest, Initialize_Success) { … }
TEST_F(MojoAudioDecoderTest, Reinitialize_Success) { … }
TEST_F(MojoAudioDecoderTest, Decode_MultipleTimes) { … }
TEST_F(MojoAudioDecoderTest, Reset_DuringDecode) { … }
TEST_F(MojoAudioDecoderTest, Reset_DuringDecode_ChunkedWrite) { … }
TEST_F(MojoAudioDecoderTest, WaitingForKey) { … }
}