OLD | NEW |
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" | |
10 #include "media/base/test_data_util.h" | 9 #include "media/base/test_data_util.h" |
11 | 10 |
12 #if defined(OS_ANDROID) | 11 #if defined(OS_ANDROID) |
13 #include "base/android/build_info.h" | 12 #include "base/android/build_info.h" |
14 #include "base/sys_info.h" | 13 #include "base/sys_info.h" |
15 #endif | 14 #endif |
16 | 15 |
17 #if defined(ENABLE_MOJO_RENDERER) | 16 #if defined(ENABLE_MOJO_RENDERER) |
18 // Remote mojo renderer does not send audio/video frames back to the renderer | 17 // Remote mojo renderer does not send audio/video frames back to the renderer |
19 // process and hence does not support capture: https://crbug.com/641559. | 18 // process and hence does not support capture: https://crbug.com/641559. |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 WebRtcCaptureFromElementBrowserTest() {} | 55 WebRtcCaptureFromElementBrowserTest() {} |
57 ~WebRtcCaptureFromElementBrowserTest() override {} | 56 ~WebRtcCaptureFromElementBrowserTest() override {} |
58 | 57 |
59 void SetUpCommandLine(base::CommandLine* command_line) override { | 58 void SetUpCommandLine(base::CommandLine* command_line) override { |
60 WebRtcContentBrowserTestBase::SetUpCommandLine(command_line); | 59 WebRtcContentBrowserTestBase::SetUpCommandLine(command_line); |
61 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 60 base::CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
62 switches::kEnableBlinkFeatures, "MediaCaptureFromVideo"); | 61 switches::kEnableBlinkFeatures, "MediaCaptureFromVideo"); |
63 | 62 |
64 // Allow <video>/<audio>.play() when not initiated by user gesture. | 63 // Allow <video>/<audio>.play() when not initiated by user gesture. |
65 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 64 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
66 switches::kIgnoreAutoplayRestrictionsForTests); | 65 switches::kDisableGestureRequirementForMediaPlayback); |
67 // Allow experimental canvas features. | 66 // Allow experimental canvas features. |
68 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 67 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
69 switches::kEnableExperimentalCanvasFeatures); | 68 switches::kEnableExperimentalCanvasFeatures); |
70 } | 69 } |
71 | 70 |
72 private: | 71 private: |
73 DISALLOW_COPY_AND_ASSIGN(WebRtcCaptureFromElementBrowserTest); | 72 DISALLOW_COPY_AND_ASSIGN(WebRtcCaptureFromElementBrowserTest); |
74 }; | 73 }; |
75 | 74 |
76 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, | 75 IN_PROC_BROWSER_TEST_F(WebRtcCaptureFromElementBrowserTest, |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 GetParam().has_video, | 137 GetParam().has_video, |
139 GetParam().has_audio, | 138 GetParam().has_audio, |
140 GetParam().use_audio_tag), | 139 GetParam().use_audio_tag), |
141 kVideoAudioHtmlFile); | 140 kVideoAudioHtmlFile); |
142 } | 141 } |
143 | 142 |
144 INSTANTIATE_TEST_CASE_P(, | 143 INSTANTIATE_TEST_CASE_P(, |
145 WebRtcCaptureFromElementBrowserTest, | 144 WebRtcCaptureFromElementBrowserTest, |
146 testing::ValuesIn(kFileAndTypeParameters)); | 145 testing::ValuesIn(kFileAndTypeParameters)); |
147 } // namespace content | 146 } // namespace content |
OLD | NEW |