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

Side by Side Diff: content/browser/webrtc/webrtc_capture_from_element_browsertest.cc

Issue 2845973005: Reland of name kDisableGestureRequirementForMediaPlayback and make it a test-only flag. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" 7 #include "content/browser/webrtc/webrtc_content_browsertest_base.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "media/base/media_switches.h"
9 #include "media/base/test_data_util.h" 10 #include "media/base/test_data_util.h"
10 11
11 #if defined(OS_ANDROID) 12 #if defined(OS_ANDROID)
12 #include "base/android/build_info.h" 13 #include "base/android/build_info.h"
13 #include "base/sys_info.h" 14 #include "base/sys_info.h"
14 #endif 15 #endif
15 16
16 #if defined(ENABLE_MOJO_RENDERER) 17 #if defined(ENABLE_MOJO_RENDERER)
17 // Remote mojo renderer does not send audio/video frames back to the renderer 18 // Remote mojo renderer does not send audio/video frames back to the renderer
18 // process and hence does not support capture: https://crbug.com/641559. 19 // process and hence does not support capture: https://crbug.com/641559.
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 WebRtcCaptureFromElementBrowserTest() {} 56 WebRtcCaptureFromElementBrowserTest() {}
56 ~WebRtcCaptureFromElementBrowserTest() override {} 57 ~WebRtcCaptureFromElementBrowserTest() override {}
57 58
58 void SetUpCommandLine(base::CommandLine* command_line) override { 59 void SetUpCommandLine(base::CommandLine* command_line) override {
59 WebRtcContentBrowserTestBase::SetUpCommandLine(command_line); 60 WebRtcContentBrowserTestBase::SetUpCommandLine(command_line);
60 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( 61 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
61 switches::kEnableBlinkFeatures, "MediaCaptureFromVideo"); 62 switches::kEnableBlinkFeatures, "MediaCaptureFromVideo");
62 63
63 // Allow <video>/<audio>.play() when not initiated by user gesture. 64 // Allow <video>/<audio>.play() when not initiated by user gesture.
64 base::CommandLine::ForCurrentProcess()->AppendSwitch( 65 base::CommandLine::ForCurrentProcess()->AppendSwitch(
65 switches::kDisableGestureRequirementForMediaPlayback); 66 switches::kIgnoreAutoplayRestrictionsForTests);
66 // Allow experimental canvas features. 67 // Allow experimental canvas features.
67 base::CommandLine::ForCurrentProcess()->AppendSwitch( 68 base::CommandLine::ForCurrentProcess()->AppendSwitch(
68 switches::kEnableExperimentalCanvasFeatures); 69 switches::kEnableExperimentalCanvasFeatures);
69 } 70 }
70 71
71 private: 72 private:
72 DISALLOW_COPY_AND_ASSIGN(WebRtcCaptureFromElementBrowserTest); 73 DISALLOW_COPY_AND_ASSIGN(WebRtcCaptureFromElementBrowserTest);
73 }; 74 };
74 75
75 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, 76 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 GetParam().has_video, 138 GetParam().has_video,
138 GetParam().has_audio, 139 GetParam().has_audio,
139 GetParam().use_audio_tag), 140 GetParam().use_audio_tag),
140 kVideoAudioHtmlFile); 141 kVideoAudioHtmlFile);
141 } 142 }
142 143
143 INSTANTIATE_TEST_CASE_P(, 144 INSTANTIATE_TEST_CASE_P(,
144 WebRtcCaptureFromElementBrowserTest, 145 WebRtcCaptureFromElementBrowserTest,
145 testing::ValuesIn(kFileAndTypeParameters)); 146 testing::ValuesIn(kFileAndTypeParameters));
146 } // namespace content 147 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698