Commit 9046d706 authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Move media_stream_video_webrtc_sink_unittest.cc to Blink

This wraps up Onion souping of
media_stream_video_webrtc_sink_unittest.cc|h that happened on [1], but
was blocked on [2] - now fixed.

[1] https://crrev.com/c/1811179
[2] https://crrev.com/c/1816789

BUG=787254
R=guidou@chromium.org, haraken@chromium.org

Change-Id: I4302207403f614cdac329be3cb591a13f13db52b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816793
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704833}
parent cc47464a
......@@ -1944,7 +1944,6 @@ test("content_unittests") {
"../renderer/media/webrtc/fake_rtc_rtp_transceiver.h",
"../renderer/media/webrtc/media_stream_remote_video_source_unittest.cc",
"../renderer/media/webrtc/media_stream_track_metrics_unittest.cc",
"../renderer/media/webrtc/media_stream_video_webrtc_sink_unittest.cc",
"../renderer/media/webrtc/peer_connection_dependency_factory_unittest.cc",
"../renderer/media/webrtc/peer_connection_tracker_unittest.cc",
"../renderer/media/webrtc/rtc_peer_connection_handler_unittest.cc",
......
......@@ -381,6 +381,7 @@ jumbo_source_set("unit_tests") {
"peerconnection/adapters/quic_packet_transport_adapter_test.cc",
"peerconnection/byte_buffer_queue_test.cc",
"peerconnection/call_setup_state_tracker_unittest.cc",
"peerconnection/media_stream_video_webrtc_sink_test.cc",
"peerconnection/rtc_data_channel_test.cc",
"peerconnection/rtc_ice_transport_test.cc",
"peerconnection/rtc_ice_transport_test.h",
......
......@@ -4,22 +4,17 @@
#include "third_party/blink/public/web/modules/peerconnection/media_stream_video_webrtc_sink.h"
#include "base/test/task_environment.h"
#include "content/child/child_process.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
#include "third_party/blink/public/web/modules/mediastream/mock_media_stream_registry.h"
#include "third_party/blink/public/web/modules/mediastream/video_track_adapter_settings.h"
#include "third_party/blink/public/web/modules/peerconnection/mock_peer_connection_dependency_factory.h"
#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h"
namespace content {
namespace {
namespace blink {
class MediaStreamVideoWebRtcSinkTest : public ::testing::Test {
public:
MediaStreamVideoWebRtcSinkTest()
: task_environment_(base::test::TaskEnvironment::MainThreadType::UI) {}
void SetVideoTrack() {
registry_.Init();
registry_.AddVideoTrack("test video track");
......@@ -47,12 +42,9 @@ class MediaStreamVideoWebRtcSinkTest : public ::testing::Test {
blink::MockPeerConnectionDependencyFactory dependency_factory_;
private:
ScopedTestingPlatformSupport<IOTaskRunnerTestingPlatformSupport> platform_;
blink::MockMediaStreamRegistry registry_;
// A ChildProcess is needed to fool the Tracks and Sources into believing they
// are on the right threads. A TaskEnvironment must be instantiated
// before ChildProcess to prevent it from leaking a ThreadPool.
base::test::TaskEnvironment task_environment_;
const ChildProcess child_process_;
};
TEST_F(MediaStreamVideoWebRtcSinkTest, NoiseReductionDefaultsToNotSet) {
......@@ -64,5 +56,4 @@ TEST_F(MediaStreamVideoWebRtcSinkTest, NoiseReductionDefaultsToNotSet) {
EXPECT_FALSE(my_sink.SourceNeedsDenoisingForTesting());
}
} // namespace
} // namespace content
} // namespace blink
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment