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

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

Issue 10928043: Media Related changes for TabCapture API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rename REQUEST_*->MEDIA_REQUEST_* Created 8 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/media_stream_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
index 559b9bd370bc58e08292d7df63324f10e38058ad..cc749747137fd71ef31478cc498cf1e7bf306d4b 100644
--- a/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc
@@ -62,15 +62,6 @@ class MockMediaStreamDispatcherHost : public MediaStreamDispatcherHost,
components,
GURL());
}
- void OnGenerateStreamForDevice(int page_request_id,
- const StreamOptions& components,
- const std::string& device_id) {
- MediaStreamDispatcherHost::OnGenerateStreamForDevice(kRenderId,
- page_request_id,
- components,
- device_id,
- GURL());
- }
void OnStopGeneratedStream(const std::string& label) {
MediaStreamDispatcherHost::OnStopGeneratedStream(kRenderId, label);
}
@@ -244,32 +235,6 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStream) {
EXPECT_EQ(host_->NumberOfStreams(), 0u);
}
-TEST_F(MediaStreamDispatcherHostTest, GenerateStreamForDevice) {
- static const char kDeviceId[] = "/dev/video0";
-
- StreamOptions options(content::MEDIA_NO_SERVICE,
- content::MEDIA_DEVICE_VIDEO_CAPTURE);
-
- EXPECT_CALL(*host_, GetMediaObserver())
- .WillRepeatedly(Return(media_observer_.get()));
- EXPECT_CALL(*host_, OnStreamGenerated(kRenderId, kPageRequestId, 0, 1));
- host_->OnGenerateStreamForDevice(kPageRequestId, options, kDeviceId);
-
- EXPECT_CALL(*media_observer_.get(), OnCaptureDevicesOpened(_, _, _));
- EXPECT_CALL(*media_observer_.get(), OnCaptureDevicesClosed(_, _, _));
-
- WaitForResult();
-
- std::string label = host_->label_;
-
- EXPECT_EQ(0u, host_->audio_devices_.size());
- EXPECT_EQ(1u, host_->video_devices_.size());
- EXPECT_EQ(1u, host_->NumberOfStreams());
-
- host_->OnStopGeneratedStream(label);
- EXPECT_EQ(0u, host_->NumberOfStreams());
-}
-
TEST_F(MediaStreamDispatcherHostTest, GenerateThreeStreams) {
// This test opens three video capture devices. Two fake devices exists and it
// is expected the last call to |Open()| will open the first device again, but

Powered by Google App Engine
This is Rietveld 408576698