| 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 4d881801d29a4f3e78e05ab06197b6e22c9b00a5..29c4cec49e859bf57097c4b6a4940dc820aec284 100644
|
| --- a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
|
| +++ b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
|
| @@ -17,6 +17,9 @@ namespace {
|
|
|
| static const char kGetDepthStreamAndCallCreateImageBitmap[] =
|
| "getDepthStreamAndCallCreateImageBitmap";
|
| +static const char kGetStreamsByVideoKind[] = "getStreamsByVideoKind";
|
| +static const char kGetStreamsByVideoKindNoDepth[] =
|
| + "getStreamsByVideoKindNoDepth";
|
|
|
| void RemoveSwitchFromCommandLine(base::CommandLine* command_line,
|
| const std::string& switch_value) {
|
| @@ -74,4 +77,40 @@ IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
|
| "%s({video: true});", kGetDepthStreamAndCallCreateImageBitmap));
|
| }
|
|
|
| +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
|
|
|