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

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

Issue 2428753002: ImageCapture content_browsertests: bugfix flag passing (Closed)
Patch Set: Created 4 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/webrtc/webrtc_image_capture_browsertest.cc
diff --git a/content/browser/webrtc/webrtc_image_capture_browsertest.cc b/content/browser/webrtc/webrtc_image_capture_browsertest.cc
index 2213c5fd6a598cec2ecb3126b0d3667791c9f60a..593a8db556e03fee1abe8e3508b18c61db7fa6f7 100644
--- a/content/browser/webrtc/webrtc_image_capture_browsertest.cc
+++ b/content/browser/webrtc/webrtc_image_capture_browsertest.cc
@@ -22,13 +22,13 @@ namespace content {
#if defined(OS_WIN)
// These tests are flaky on WebRTC Windows bots: https://crbug.com/633242.
-#define MAYBE_CreateAndGetCapabilities DISABLED_CreateAndGetCapabilities
-#define MAYBE_CreateAndTakePhoto DISABLED_CreateAndTakePhoto
-#define MAYBE_CreateAndGrabFrame DISABLED_CreateAndGrabFrame
+#define MAYBE_GetCapabilities DISABLED_GetCapabilities
+#define MAYBE_TakePhoto DISABLED_TakePhoto
+#define MAYBE_GrabFrame DISABLED_GrabFrame
#else
-#define MAYBE_CreateAndGetCapabilities CreateAndGetCapabilities
-#define MAYBE_CreateAndTakePhoto CreateAndTakePhoto
-#define MAYBE_CreateAndGrabFrame CreateAndGrabFrame
+#define MAYBE_GetCapabilities GetCapabilities
+#define MAYBE_TakePhoto TakePhoto
+#define MAYBE_GrabFrame GrabFrame
#endif
namespace {
@@ -36,9 +36,7 @@ namespace {
static const char kImageCaptureHtmlFile[] = "/media/image_capture_test.html";
// TODO(mcasas): enable real-camera tests by disabling the Fake Device for
-// platforms where the ImageCaptureCode is landed, https://crbug.com/518807.
-// TODO(mcasas): enable in Android when takePhoto() can be specified a (small)
-// capture resolution preventing the test from timeout https://crbug.com/634811.
+// platforms where the ImageCaptureCode is landed, https://crbug.com/656810
static struct TargetCamera {
bool use_fake;
} const kTestParameters[] = {{true}};
@@ -67,15 +65,12 @@ class WebRtcImageCaptureBrowserTest
switches::kUseFakeDeviceForMediaStream));
}
- // Enables promised-based navigator.mediaDevices.getUserMedia();
- // TODO(mcasas): remove after https://crbug.com/503227 is closed.
+ // "GetUserMedia": enables navigator.mediaDevices.getUserMedia();
+ // TODO(mcasas): remove GetUserMedia after https://crbug.com/503227.
+ // "ImageCapture": enables the ImageCapture API.
+ // TODO(mcasas): remove ImageCapture after https://crbug.com/603328.
base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kEnableBlinkFeatures, "GetUserMedia");
-
- // Specific flag to enable ImageCapture API.
- // TODO(mcasas): remove after https://crbug.com/603328 is closed.
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kEnableBlinkFeatures, "ImageCapture");
+ switches::kEnableBlinkFeatures, "GetUserMedia,ImageCapture");
}
void SetUp() override {
@@ -112,20 +107,17 @@ class WebRtcImageCaptureBrowserTest
DISALLOW_COPY_AND_ASSIGN(WebRtcImageCaptureBrowserTest);
};
-IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest,
- MAYBE_CreateAndGetCapabilities) {
+IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest, MAYBE_GetCapabilities) {
embedded_test_server()->StartAcceptingConnections();
ASSERT_TRUE(RunImageCaptureTestCase("testCreateAndGetCapabilities()"));
ncarter (slow) 2016/10/17 23:20:13 Do you want to rename the js methods too?
mcasas 2016/10/17 23:22:05 Nah, I like the test cases to be called after what
}
-IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest,
- MAYBE_CreateAndTakePhoto) {
+IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest, MAYBE_TakePhoto) {
embedded_test_server()->StartAcceptingConnections();
ASSERT_TRUE(RunImageCaptureTestCase("testCreateAndTakePhoto()"));
}
-IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest,
- MAYBE_CreateAndGrabFrame) {
+IN_PROC_BROWSER_TEST_P(WebRtcImageCaptureBrowserTest, MAYBE_GrabFrame) {
embedded_test_server()->StartAcceptingConnections();
ASSERT_TRUE(RunImageCaptureTestCase("testCreateAndGrabFrame()"));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698