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

Unified Diff: content/browser/media/webrtc/webrtc_webcam_browsertest.cc

Issue 2197143002: Revert of ImageCapture: content_browsertest WebRtcImageCaptureBrowserTest CreateAndGetCapabilities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « content/browser/media/webrtc/webrtc_webcam_browsertest.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/webrtc/webrtc_webcam_browsertest.cc
diff --git a/content/browser/media/webrtc/webrtc_webcam_browsertest.cc b/content/browser/media/webrtc/webrtc_webcam_browsertest.cc
index 5f9d7c36e8a73a908bf73973ce2dd0ee8762a53f..d1269c972aaac620dd11079df2976f109835ae91 100644
--- a/content/browser/media/webrtc/webrtc_webcam_browsertest.cc
+++ b/content/browser/media/webrtc/webrtc_webcam_browsertest.cc
@@ -1,8 +1,6 @@
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-
-#include "content/browser/media/webrtc/webrtc_webcam_browsertest.h"
#include "base/command_line.h"
#include "base/strings/utf_string_conversions.h"
@@ -42,25 +40,31 @@
namespace content {
-void WebRtcWebcamBrowserTest::SetUpCommandLine(
- base::CommandLine* command_line) {
- // Allows for accessing capture devices without prompting for permission.
- command_line->AppendSwitch(switches::kUseFakeUIForMediaStream);
+// This class doesn't inherit from WebRtcContentBrowserTestBase like the others
+// since we want it to actually acquire the real webcam on the system (if there
+// is one).
+class WebRtcWebcamBrowserTest: public ContentBrowserTest {
+ public:
+ ~WebRtcWebcamBrowserTest() override {}
- // The content_browsertests run with this flag by default, and this test is
- // the only current exception to that rule, so just remove the flag
- // --use-fake-device-for-media-stream here. We could also have all tests
- // involving media streams add this flag explicitly, but it will be really
- // unintuitive for developers to write tests involving media stream and have
- // them fail on what looks like random bots, so running with fake devices
- // is really a reasonable default.
- RemoveFakeDeviceFromCommandLine(command_line);
-}
+ void SetUpCommandLine(base::CommandLine* command_line) override {
+ command_line->AppendSwitch(switches::kUseFakeUIForMediaStream);
-void WebRtcWebcamBrowserTest::SetUp() {
- EnablePixelOutput();
- ContentBrowserTest::SetUp();
-}
+ // The content_browsertests run with this flag by default, and this test is
+ // the only current exception to that rule, so just remove the flag
+ // --use-fake-device-for-media-stream here. We could also have all tests
+ // involving media streams add this flag explicitly, but it will be really
+ // unintuitive for developers to write tests involving media stream and have
+ // them fail on what looks like random bots, so running with fake devices
+ // is really a reasonable default.
+ RemoveFakeDeviceFromCommandLine(command_line);
+ }
+
+ void SetUp() override {
+ EnablePixelOutput();
+ ContentBrowserTest::SetUp();
+ }
+};
// The test is tagged as MANUAL since the webcam is a system-level resource; we
// only want it to run on bots where we can ensure sequential execution. The
« no previous file with comments | « content/browser/media/webrtc/webrtc_webcam_browsertest.h ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698