OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 } | 194 } |
195 | 195 |
196 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, | 196 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, |
197 CanMakeVideoCallAndThenRenegotiateToAudio) { | 197 CanMakeVideoCallAndThenRenegotiateToAudio) { |
198 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( | 198 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( |
199 "callAndRenegotiateToAudio(" | 199 "callAndRenegotiateToAudio(" |
200 " %s, {audio: true, video:true}, {audio: true});", | 200 " %s, {audio: true, video:true}, {audio: true});", |
201 kUseLenientAudioChecking)); | 201 kUseLenientAudioChecking)); |
202 } | 202 } |
203 | 203 |
204 // Below 2 test will make a complete PeerConnection-based call between pc1 and | 204 // This test makes a call between pc1 and pc2 where a video only stream is sent |
205 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and | 205 // from pc1 to pc2. The stream sent from pc1 to pc2 is cloned from the stream |
206 // then verify that video is received on pc3 and pc4. | 206 // received on pc2 to test that cloning of remote video tracks works as |
207 // The stream sent from pc3 to pc4 is the stream received on pc1. | 207 // intended and is sent back to pc1. |
208 // The stream sent from pc4 to pc3 is cloned from stream the stream received | 208 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CanForwardRemoteStream) { |
209 // on pc2. | |
210 #if defined(THREAD_SANITIZER) || defined(OS_WIN) | |
211 // Flaky on TSAN v2. http://crbug.com/373637 | |
212 // Flaky on Windows: http://crbug.com/469819 | |
213 #define MAYBE_CanForwardRemoteStream DISABLED_CanForwardRemoteStream | |
214 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p | |
215 #else | |
216 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream | |
217 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p | |
218 #endif | |
219 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { | |
220 #if defined (OS_ANDROID) | 209 #if defined (OS_ANDROID) |
221 // This test fails on Nexus 5 devices. | 210 // This test fails on Nexus 5 devices. |
222 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | 211 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 |
223 // for details. | 212 // for details. |
224 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 213 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
225 switches::kDisableWebRtcHWDecoding); | 214 switches::kDisableWebRtcHWDecoding); |
226 #endif | 215 #endif |
227 MakeTypicalPeerConnectionCall( | 216 MakeTypicalPeerConnectionCall( |
228 "callAndForwardRemoteStream({video: true, audio: false});"); | 217 "callAndForwardRemoteStream({video: true, audio: false});"); |
229 } | 218 } |
230 | 219 |
231 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, | 220 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, |
232 MAYBE_CanForwardRemoteStream720p) { | |
233 #if defined (OS_ANDROID) | |
234 // This test fails on Nexus 5 devices. | |
235 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | |
236 // for details. | |
237 base::CommandLine::ForCurrentProcess()->AppendSwitch( | |
238 switches::kDisableWebRtcHWDecoding); | |
239 #endif | |
240 const std::string javascript = GenerateGetUserMediaCall( | |
241 "callAndForwardRemoteStream", 1280, 1280, 720, 720, 10, 30); | |
242 MakeTypicalPeerConnectionCall(javascript); | |
243 } | |
244 | |
245 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, | |
246 NoCrashWhenConnectChromiumSinkToRemoteTrack) { | 221 NoCrashWhenConnectChromiumSinkToRemoteTrack) { |
247 MakeTypicalPeerConnectionCall("ConnectChromiumSinkToRemoteAudioTrack();"); | 222 MakeTypicalPeerConnectionCall("ConnectChromiumSinkToRemoteAudioTrack();"); |
248 } | 223 } |
249 | 224 |
250 // This test will make a complete PeerConnection-based call but remove the | 225 // This test will make a complete PeerConnection-based call but remove the |
251 // MSID and bundle attribute from the initial offer to verify that | 226 // MSID and bundle attribute from the initial offer to verify that |
252 // video is playing for the call even if the initiating client don't support | 227 // video is playing for the call even if the initiating client don't support |
253 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 | 228 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 |
254 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 229 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
255 // Timing out on ARM linux, see http://crbug.com/240373 | 230 // Timing out on ARM linux, see http://crbug.com/240373 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 418 |
444 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { | 419 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
445 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); | 420 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); |
446 } | 421 } |
447 | 422 |
448 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { | 423 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { |
449 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); | 424 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); |
450 } | 425 } |
451 | 426 |
452 } // namespace content | 427 } // namespace content |
OLD | NEW |