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

Unified Diff: content/browser/webrtc/webrtc_depth_capture_browsertest.cc

Issue 2664673002: Media Capture Depth Stream Extensions API: videoKind settings and constraint. (Closed)
Patch Set: GetVideoKindForFormat moved to utility. thanks guidou@. 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
« no previous file with comments | « no previous file | content/renderer/media/media_stream_constraints_util_video_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webrtc/webrtc_depth_capture_browsertest.cc
diff --git a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
index 3164a8569882be15d168dc505b6c930baa2efa34..5f41ae543268ae6b1a44c9866cc1be499e2befc0 100644
--- a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
+++ b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
@@ -21,6 +21,9 @@ static const char kGetDepthStreamAndCameraCalibration[] =
"getDepthStreamAndCameraCalibration";
static const char kGetBothStreamsAndCheckForFeaturesPresence[] =
"getBothStreamsAndCheckForFeaturesPresence";
+static const char kGetStreamsByVideoKind[] = "getStreamsByVideoKind";
+static const char kGetStreamsByVideoKindNoDepth[] =
+ "getStreamsByVideoKindNoDepth";
void RemoveSwitchFromCommandLine(base::CommandLine* command_line,
const std::string& switch_value) {
@@ -110,4 +113,40 @@ IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
"%s({video: true});", kGetBothStreamsAndCheckForFeaturesPresence));
}
+IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest, GetStreamsByVideoKind) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ command_line->AppendSwitchASCII("--enable-blink-features",
+ "MediaGetSettings,MediaCaptureDepth");
+
+ ASSERT_TRUE(embedded_test_server()->Start());
+
+ GURL url(
+ embedded_test_server()->GetURL("/media/getusermedia-depth-capture.html"));
+ NavigateToURL(shell(), url);
+
+ ExecuteJavascriptAndWaitForOk(
+ base::StringPrintf("%s({video: true});", kGetStreamsByVideoKind));
+}
+
+IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
+ GetStreamsByVideoKindNoDepth) {
+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
+ // Set fake factory to have only one device, of type "color".
+ RemoveSwitchFromCommandLine(command_line,
+ switches::kUseFakeDeviceForMediaStream);
+ command_line->AppendSwitchASCII(switches::kUseFakeDeviceForMediaStream,
+ "device-count=1");
+ command_line->AppendSwitchASCII("--enable-blink-features",
+ "MediaGetSettings,MediaCaptureDepth");
+
+ ASSERT_TRUE(embedded_test_server()->Start());
+
+ GURL url(
+ embedded_test_server()->GetURL("/media/getusermedia-depth-capture.html"));
+ NavigateToURL(shell(), url);
+
+ ExecuteJavascriptAndWaitForOk(
+ base::StringPrintf("%s({video: true});", kGetStreamsByVideoKindNoDepth));
+}
+
} // namespace content
« no previous file with comments | « no previous file | content/renderer/media/media_stream_constraints_util_video_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698