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

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

Issue 2476693002: WebGL & 16-bit video stream: upload to FLOAT texture. (Closed)
Patch Set: Lossless access to 16-bit video stream using WebGL GL_FLOAT texture. Created 4 years, 1 month 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..7d83bed55dd3b99a24fbdda1b435bda713711ae3 100644
--- a/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
+++ b/content/browser/webrtc/webrtc_depth_capture_browsertest.cc
@@ -12,11 +12,14 @@
#include "content/public/test/content_browser_test_utils.h"
#include "media/base/media_switches.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
+#include "ui/gl/gl_switches.h"
namespace {
static const char kGetDepthStreamAndCallCreateImageBitmap[] =
"getDepthStreamAndCallCreateImageBitmap";
+static const char kGetDepthStreamAndCallGLTexImage2D[] =
+ "getDepthStreamAndCallGLTexImage2D";
void RemoveSwitchFromCommandLine(base::CommandLine* command_line,
const std::string& switch_value) {
@@ -74,4 +77,33 @@ IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureBrowserTest,
"%s({video: true});", kGetDepthStreamAndCallCreateImageBitmap));
}
+class WebRtcDepthCaptureWebGLBrowserTest
+ : public WebRtcDepthCaptureBrowserTest {
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ WebRtcDepthCaptureBrowserTest::SetUpCommandLine(command_line);
+ // WebGL tests require hardware GPU.
+ command_line->AppendSwitch(switches::kUseGpuInTests);
+ }
+};
+
+// TODO(aleksandar.stojiljkovic): Enable the test on all the platforms when GPU
+// process initialization crashes gets resolved.
+// See https://crbug.com/662336 and https://crbug.com/510291
+#if defined(USE_OZONE) || defined(OS_WIN) || defined(MEMORY_SANITIZER)
+#define MAYBE_GetDepthStreamAndCallGLTexImage2D \
+ DISABLED_GetDepthStreamAndCallGLTexImage2D
+#else
+#define MAYBE_GetDepthStreamAndCallGLTexImage2D \
+ GetDepthStreamAndCallGLTexImage2D
+#endif
+IN_PROC_BROWSER_TEST_F(WebRtcDepthCaptureWebGLBrowserTest,
+ MAYBE_GetDepthStreamAndCallGLTexImage2D) {
+ 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});", kGetDepthStreamAndCallGLTexImage2D));
+}
+
} // namespace content
« no previous file with comments | « no previous file | content/renderer/media/webmediaplayer_ms.h » ('j') | content/test/data/media/getusermedia-depth-capture.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698