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

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

Issue 2606983002: Media Capture Depth Stream Extensions API: focal length and depth range. (Closed)
Patch Set: 80-char line fix in test html. 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/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..3164a8569882be15d168dc505b6c930baa2efa34 100644
--- a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
+++ b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
@@ -17,6 +17,10 @@ namespace {
static const char kGetDepthStreamAndCallCreateImageBitmap[] =
"getDepthStreamAndCallCreateImageBitmap";
+static const char kGetDepthStreamAndCameraCalibration[] =
+ "getDepthStreamAndCameraCalibration";
+static const char kGetBothStreamsAndCheckForFeaturesPresence[] =
+ "getBothStreamsAndCheckForFeaturesPresence";
void RemoveSwitchFromCommandLine(base::CommandLine* command_line,
const std::string& switch_value) {
@@ -74,4 +78,36 @@ IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
"%s({video: true});", kGetDepthStreamAndCallCreateImageBitmap));
}
+IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
+ GetDepthStreamAndCameraCalibration) {
+ 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});", kGetDepthStreamAndCameraCalibration));
+}
+
+IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
+ GetBothStreamsAndCheckForFeaturesPresence) {
+ 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});", kGetBothStreamsAndCheckForFeaturesPresence));
+}
+
} // namespace content
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager.cc ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698