#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/mojo/clients/mojo_audio_encoder.h"
#include <memory>
#include "base/containers/heap_array.h"
#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/sequenced_task_runner.h"
#include "base/test/bind.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_encoder.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/mojom/audio_encoder.mojom.h"
#include "media/mojo/services/mojo_audio_encoder_service.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;
_;
DoAll;
Invoke;
InvokeWithoutArgs;
Return;
StrictMock;
namespace media {
class MojoAudioEncoderTest : public ::testing::Test { … };
TEST_F(MojoAudioEncoderTest, Initialize_Success) { … }
TEST_F(MojoAudioEncoderTest, Initialize_Fail) { … }
TEST_F(MojoAudioEncoderTest, Initialize_Twice) { … }
TEST_F(MojoAudioEncoderTest, Encode) { … }
TEST_F(MojoAudioEncoderTest, EncodeWithEmptyResult) { … }
TEST_F(MojoAudioEncoderTest, Flush) { … }
TEST_F(MojoAudioEncoderTest, MojoErrorCallsAllDoneCallbacks) { … }
}