#include "components/cast_streaming/renderer/web_codecs/delegating_decoder_buffer_provider.h"
#include <memory>
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "components/cast_streaming/renderer/public/decoder_buffer_provider.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/decoder_buffer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace cast_streaming::webcodecs {
namespace {
class MockDecoderBufferProvider
: public DecoderBufferProvider<media::AudioDecoderConfig> { … };
class MockClient { … };
}
class DelegatingDecoderBufferProviderTest : public testing::Test { … };
TEST_F(DelegatingDecoderBufferProviderTest, GetConfigAsyncSucceeds) { … }
TEST_F(DelegatingDecoderBufferProviderTest, GetConfigAsyncFails) { … }
TEST_F(DelegatingDecoderBufferProviderTest, ReadBufferAsyncSucceeds) { … }
TEST_F(DelegatingDecoderBufferProviderTest, ReadBufferAsyncFails) { … }
TEST_F(DelegatingDecoderBufferProviderTest, SetInvalidationCallbackSucceeds) { … }
TEST_F(DelegatingDecoderBufferProviderTest, SetInvalidationCallbackFails) { … }
}