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

Unified Diff: extensions/browser/guest_view/web_view/web_view_media_access_apitest.cc

Issue 2941563002: Enable new getUserMedia audio constraints algorithm behind a flag. (Closed)
Patch Set: remove vertical space from DEPS Created 3 years, 6 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 | « extensions/browser/guest_view/web_view/DEPS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..1fab6b4d6f941bd3dfffcfb86efc397c3ca7f994 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,12 +2,14 @@
// 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"
#include "content/public/test/browser_test_utils.h"
#include "extensions/browser/guest_view/web_view/web_view_apitest.h"
#include "extensions/test/extension_test_message_listener.h"
+#include "media/base/media_switches.h"
namespace {
@@ -80,6 +82,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 {
+ // Enable fake devices to make sure there is at least one device in the
+ // system. Otherwise, this test would fail on machines without physical
+ // media devices since getUserMedia fails early in those cases.
+ WebViewAPITest::SetUpCommandLine(command_line);
+ command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
+ }
};
IN_PROC_BROWSER_TEST_F(WebViewMediaAccessAPITest, TestAllow) {
« no previous file with comments | « extensions/browser/guest_view/web_view/DEPS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698