#include <algorithm>
#include "base/functional/callback_helpers.h"
#include "base/strings/strcat.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "media/base/media_switches.h"
#include "media/base/video_frame.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/peerconnection/webrtc_video_track_source.h"
#include "third_party/blink/renderer/platform/testing/video_frame_utils.h"
#include "third_party/blink/renderer/platform/webrtc/convert_to_webrtc_video_frame_buffer.h"
#include "third_party/webrtc/api/video/video_frame.h"
#include "third_party/webrtc/rtc_base/ref_counted_object.h"
_;
Invoke;
Mock;
Sequence;
namespace blink {
void ExpectUpdateRectEquals(const gfx::Rect& expected,
const webrtc::VideoFrame::UpdateRect actual) { … }
class MockVideoSink : public rtc::VideoSinkInterface<webrtc::VideoFrame> { … };
TEST(WebRtcVideoTrackSourceRefreshFrameTest, CallsRefreshFrame) { … }
class WebRtcVideoTrackSourceTest
: public ::testing::TestWithParam<
std::tuple<media::VideoFrame::StorageType, media::VideoPixelFormat>> { … };
namespace {
std::vector<WebRtcVideoTrackSourceTest::ParamType> TestParams() { … }
}
TEST_P(WebRtcVideoTrackSourceTest, TestTimestamps) { … }
TEST_P(WebRtcVideoTrackSourceTest, CropFrameTo640360) { … }
TEST_P(WebRtcVideoTrackSourceTest, TestColorSpaceSettings) { … }
TEST_P(WebRtcVideoTrackSourceTest, SetsFeedback) { … }
TEST_P(WebRtcVideoTrackSourceTest, CropFrameTo320320) { … }
TEST_P(WebRtcVideoTrackSourceTest, Scale720To640360) { … }
TEST_P(WebRtcVideoTrackSourceTest, UpdateRectWithNoTransform) { … }
TEST_P(WebRtcVideoTrackSourceTest, UpdateRectWithCropFromUpstream) { … }
TEST_P(WebRtcVideoTrackSourceTest, UpdateRectWithScaling) { … }
INSTANTIATE_TEST_SUITE_P(…);
}