Index: extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc |
diff --git a/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc b/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc |
index c013665c062d2e4c75d6d37fa6eb353ef9142c9f..4a4daa1566c91c6129381781f9c4f4c7c1e1611e 100644 |
--- a/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc |
+++ b/extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc |
@@ -2,6 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
+#include "base/command_line.h" |
#include "base/macros.h" |
#include "base/strings/stringprintf.h" |
#include "content/public/browser/web_contents_delegate.h" |
@@ -69,7 +70,13 @@ namespace extensions { |
class WebViewMediaAccessAPITest : public WebViewAPITest { |
protected: |
- WebViewMediaAccessAPITest() {} |
+ WebViewMediaAccessAPITest() { |
+ // This switch ensures that there will always be at least one media device, |
+ // even on machines without physical devices. This is required for tests |
+ // that request permission to use media devices. |
+ base::CommandLine::ForCurrentProcess()->AppendSwitch( |
Marijn Kruisselbrink
2017/04/11 18:02:17
nit: To add command line flags you should probably
|
+ "use-fake-device-for-media-stream"); |
+ } |
// Runs media_access tests. |
void RunTest(const std::string& test_name) { |