#include <memory>
#include <string>
#include <vector>
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "media/base/decoder_buffer.h"
#include "media/base/decrypt_config.h"
#include "media/base/decryptor.h"
#include "media/base/demuxer_stream.h"
#include "media/base/media_util.h"
#include "media/base/mock_filters.h"
#include "media/base/pipeline_status.h"
#include "media/base/test_helpers.h"
#include "media/filters/decrypting_demuxer_stream.h"
#include "media/filters/decrypting_media_resource.h"
#include "testing/gmock/include/gmock/gmock.h"
RunCallback;
RunOnceCallback;
_;
AnyNumber;
Invoke;
Return;
StrictMock;
namespace media {
static constexpr int kFakeBufferSize = …;
static constexpr char kFakeKeyId[] = …;
static constexpr char kFakeIv[] = …;
namespace {
ACTION_P(ReturnBuffer, buffer) { … }
}
class DecryptingMediaResourceTest : public testing::Test { … };
TEST_F(DecryptingMediaResourceTest, ClearStreams) { … }
TEST_F(DecryptingMediaResourceTest, EncryptedStreams) { … }
TEST_F(DecryptingMediaResourceTest, MixedStreams) { … }
TEST_F(DecryptingMediaResourceTest,
OneDecryptingDemuxerStreamFailsInitialization) { … }
TEST_F(DecryptingMediaResourceTest,
BothDecryptingDemuxerStreamsFailInitialization) { … }
TEST_F(DecryptingMediaResourceTest, WaitingCallback) { … }
}