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..2ee74f7d4f63ce4bc08d4bc299de4c48091aa542 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" |
@@ -80,6 +81,14 @@ class WebViewMediaAccessAPITest : public WebViewAPITest { |
base::StringPrintf("runTest('%s');", test_name.c_str()))); |
ASSERT_TRUE(test_run_listener.WaitUntilSatisfied()); |
} |
+ |
+ void SetUpCommandLine(base::CommandLine* command_line) override { |
+ WebViewAPITest::SetUpCommandLine(command_line); |
+ // This switch ensures that there will always be at least one media device, |
+ // even on machines without physical devices. This is required by tests that |
+ // request permission to use media devices. |
+ command_line->AppendSwitch("use-fake-device-for-media-stream"); |
+ } |
}; |
IN_PROC_BROWSER_TEST_F(WebViewMediaAccessAPITest, TestAllow) { |