Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Unified Diff: content/browser/renderer_host/media/video_capture_host_unittest.cc

Issue 2430313007: VideoCapture: remove last remnants of IPC (Closed)
Patch Set: rockot@ comment on using ChildThread Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_host_unittest.cc
diff --git a/content/browser/renderer_host/media/video_capture_host_unittest.cc b/content/browser/renderer_host/media/video_capture_host_unittest.cc
index 7dfeed85379ff374bca3c09a826db0cbfa1c8c60..48679a438720af110c5db3950106075e50535f33 100644
--- a/content/browser/renderer_host/media/video_capture_host_unittest.cc
+++ b/content/browser/renderer_host/media/video_capture_host_unittest.cc
@@ -23,7 +23,6 @@
#include "content/browser/renderer_host/media/media_stream_manager.h"
#include "content/browser/renderer_host/media/media_stream_requester.h"
#include "content/browser/renderer_host/media/video_capture_manager.h"
-#include "content/common/media/video_capture_messages.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/mock_resource_context.h"
#include "content/public/test/test_browser_context.h"
@@ -32,6 +31,7 @@
#include "media/audio/mock_audio_manager.h"
#include "media/base/media_switches.h"
#include "media/base/video_capture_types.h"
+#include "mojo/public/cpp/bindings/binding.h"
#include "net/url_request/url_request_context.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -112,8 +112,7 @@ class VideoCaptureHostTest : public testing::Test,
media_stream_manager_.reset(new MediaStreamManager(audio_manager_.get()));
// Create a Host and connect it to a simulated IPC channel.
- host_ = new VideoCaptureHost(media_stream_manager_.get());
- host_->OnChannelConnected(base::GetCurrentProcId());
+ host_.reset(new VideoCaptureHost(media_stream_manager_.get()));
OpenSession();
}
@@ -124,9 +123,6 @@ class VideoCaptureHostTest : public testing::Test,
CloseSession();
- // Simulate closing the IPC sender.
- host_->OnChannelClosing();
-
// Release the reference to the mock object. The object will be destructed
// on the current message loop.
host_ = nullptr;
@@ -312,7 +308,7 @@ class VideoCaptureHostTest : public testing::Test,
int opened_session_id_;
std::string opened_device_label_;
- scoped_refptr<VideoCaptureHost> host_;
+ std::unique_ptr<VideoCaptureHost> host_;
mojo::Binding<mojom::VideoCaptureObserver> observer_binding_;
DISALLOW_COPY_AND_ASSIGN(VideoCaptureHostTest);
« no previous file with comments | « content/browser/renderer_host/media/video_capture_host.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698