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

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

Issue 2664673002: Media Capture Depth Stream Extensions API: videoKind settings and constraint. (Closed)
Patch Set: Created 3 years, 10 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 1db3b4fc14d922510e5453937be904b04461d0fc..76a4a410f67abe6e5ab2116963d341f427dc4128 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
@@ -469,6 +469,23 @@ TEST_F(MediaStreamDispatcherHostTest, GenerateStreamWithAudioAndVideo) {
EXPECT_EQ(host_->video_devices_.size(), 1u);
}
+// Test that we generate video stream when video kind is specified.
+TEST_F(MediaStreamDispatcherHostTest, GenerateStreamFromVideoKind) {
+ StreamControls controls(false, true);
+ controls.video_kind = VIDEO_KIND_COLOR;
+
+ // Fake capture has one color capture device and doesn't have a depth device.
+ SetupFakeUI(true);
+ GenerateStreamAndWaitForResult(kRenderId, kPageRequestId, controls);
+
+ EXPECT_EQ(host_->audio_devices_.size(), 0u);
+ EXPECT_EQ(host_->video_devices_.size(), 1u);
+
+ controls.video_kind = VIDEO_KIND_DEPTH;
+ GenerateStreamAndWaitForFailure(kRenderId, kPageRequestId, controls,
+ MEDIA_DEVICE_NO_HARDWARE);
+}
+
// This test generates two streams with video only using the same render frame
// id. The same capture device with the same device and session id is expected
// to be used.

Powered by Google App Engine
This is Rietveld 408576698