Commit 8a0f68de authored by Antonio Gomes's avatar Antonio Gomes Committed by Commit Bot

Move webrtc_media_stream_track_adapter_map_unittest.cc to Blink

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

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

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

Change-Id: If134aed18197306d43cbdfa18430b9aab11e6fb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1816796
Commit-Queue: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#704903}
parent 9483c04e
...@@ -1952,7 +1952,6 @@ test("content_unittests") { ...@@ -1952,7 +1952,6 @@ test("content_unittests") {
"../renderer/media/webrtc/task_queue_factory_unittest.cc", "../renderer/media/webrtc/task_queue_factory_unittest.cc",
"../renderer/media/webrtc/transceiver_state_surfacer_unittest.cc", "../renderer/media/webrtc/transceiver_state_surfacer_unittest.cc",
"../renderer/media/webrtc/webrtc_audio_renderer_unittest.cc", "../renderer/media/webrtc/webrtc_audio_renderer_unittest.cc",
"../renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc",
"../renderer/media/webrtc/webrtc_set_description_observer_unittest.cc", "../renderer/media/webrtc/webrtc_set_description_observer_unittest.cc",
"../renderer/peripheral_content_heuristic_unittest.cc", "../renderer/peripheral_content_heuristic_unittest.cc",
"../renderer/queue_message_swap_promise_unittest.cc", "../renderer/queue_message_swap_promise_unittest.cc",
......
...@@ -391,6 +391,7 @@ jumbo_source_set("unit_tests") { ...@@ -391,6 +391,7 @@ jumbo_source_set("unit_tests") {
"peerconnection/rtc_quic_transport_test.cc", "peerconnection/rtc_quic_transport_test.cc",
"peerconnection/rtc_quic_transport_test.h", "peerconnection/rtc_quic_transport_test.h",
"peerconnection/rtc_sctp_transport_test.cc", "peerconnection/rtc_sctp_transport_test.cc",
"peerconnection/webrtc_media_stream_track_adapter_map_test.cc",
"peerconnection/webrtc_media_stream_track_adapter_test.cc", "peerconnection/webrtc_media_stream_track_adapter_test.cc",
"picture_in_picture/picture_in_picture_controller_test.cc", "picture_in_picture/picture_in_picture_controller_test.cc",
"presentation/mock_presentation_service.h", "presentation/mock_presentation_service.h",
......
...@@ -23,6 +23,8 @@ include_rules = [ ...@@ -23,6 +23,8 @@ include_rules = [
specific_include_rules = { specific_include_rules = {
".*test\.cc" : [ ".*test\.cc" : [
"+base/run_loop.h", "+base/run_loop.h",
"+base/test/bind_test_util.h",
"+base/test/test_timeouts.h",
"+ui/gfx/color_space.h", "+ui/gfx/color_space.h",
], ],
} }
...@@ -7,13 +7,11 @@ ...@@ -7,13 +7,11 @@
#include <memory> #include <memory>
#include "base/bind.h" #include "base/bind.h"
#include "base/memory/ref_counted.h" #include "base/memory/scoped_refptr.h"
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/test/bind_test_util.h" #include "base/test/bind_test_util.h"
#include "base/test/task_environment.h"
#include "base/test/test_timeouts.h" #include "base/test/test_timeouts.h"
#include "content/child/child_process.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_source.h" #include "third_party/blink/public/platform/modules/mediastream/media_stream_audio_source.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h" #include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
...@@ -22,8 +20,9 @@ ...@@ -22,8 +20,9 @@
#include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/platform/web_string.h"
#include "third_party/blink/public/web/modules/peerconnection/mock_peer_connection_dependency_factory.h" #include "third_party/blink/public/web/modules/peerconnection/mock_peer_connection_dependency_factory.h"
#include "third_party/blink/public/web/web_heap.h" #include "third_party/blink/public/web/web_heap.h"
#include "third_party/blink/renderer/platform/testing/io_task_runner_testing_platform_support.h"
namespace content { namespace blink {
class WebRtcMediaStreamTrackAdapterMapTest : public ::testing::Test { class WebRtcMediaStreamTrackAdapterMapTest : public ::testing::Test {
public: public:
...@@ -111,10 +110,7 @@ class WebRtcMediaStreamTrackAdapterMapTest : public ::testing::Test { ...@@ -111,10 +110,7 @@ class WebRtcMediaStreamTrackAdapterMapTest : public ::testing::Test {
} }
protected: protected:
// The TaskEnvironment prevents the ChildProcess from leaking a ScopedTestingPlatformSupport<IOTaskRunnerTestingPlatformSupport> platform_;
// ThreadPool.
base::test::TaskEnvironment task_environment_;
ChildProcess child_process_;
std::unique_ptr<blink::MockPeerConnectionDependencyFactory> std::unique_ptr<blink::MockPeerConnectionDependencyFactory>
dependency_factory_; dependency_factory_;
...@@ -358,4 +354,4 @@ TEST_F(WebRtcMediaStreamTrackAdapterMapStressTest, StressTest) { ...@@ -358,4 +354,4 @@ TEST_F(WebRtcMediaStreamTrackAdapterMapStressTest, StressTest) {
RunStressTest(kNumStressTestIterations); RunStressTest(kNumStressTestIterations);
} }
} // 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