#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
#include "base/test/scoped_feature_list.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_codec_specifics_vp_8.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame_metadata.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame_options.h"
#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
#include "third_party/blink/renderer/platform/testing/task_environment.h"
#include "third_party/webrtc/api/test/mock_transformable_video_frame.h"
_;
NiceMock;
Return;
ReturnRef;
SaveArg;
MockTransformableVideoFrame;
namespace blink {
class RTCEncodedVideoFrameTest : public testing::Test { … };
webrtc::VideoFrameMetadata MockVP9Metadata(MockTransformableVideoFrame* frame) { … }
webrtc::VideoFrameMetadata MockVP8Metadata(MockTransformableVideoFrame* frame) { … }
TEST_F(RTCEncodedVideoFrameTest, GetMetadataReturnsMetadata) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataPreservesVP9CodecSpecifics) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataMissingFieldsFails) { … }
RTCEncodedVideoFrameMetadata* CreateMetadata(bool change_all_fields = false) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataWithoutFeatureFailsModifications) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataWithFeatureAllowsModifications) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataOnEmptyFrameFails) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataRejectsInvalidDependencies) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataRejectsTooEarlyDependencies) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataRejectsTooManyDependencies) { … }
TEST_F(RTCEncodedVideoFrameTest, SetMetadataModifiesRtpTimestamp) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorPreservesVP9CodecSpecifics) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorMissingFieldsFails) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorWithoutFeatureFailsModifications) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorWithFeatureAllowsModifications) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorFromNull) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorOnEmptyFrameWorks) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorWithMetadataOnEmptyFrameFails) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorRejectsInvalidDependencies) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorCopiesMetadata) { … }
TEST_F(RTCEncodedVideoFrameTest, ConstructorWithMetadataGetsNewMetadata) { … }
TEST_F(RTCEncodedVideoFrameTest,
ConstructorWithMetadataDoesNotAllowChangingPayloadType) { … }
TEST_F(RTCEncodedVideoFrameTest, ReadingDataOnEmptyFrameGivesDetachedFrame) { … }
TEST_F(RTCEncodedVideoFrameTest, PassWebRTCDetachesFrameData) { … }
}