| 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
|
|
|