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. |
206 // then verify that video is received on pc3 and pc4. | 206 // The stream sent from pc1 to pc2 is cloned from the stream received on pc2 |
207 // The stream sent from pc3 to pc4 is the stream received on pc1. | 207 // to test that cloning of remote video tracks works as intended and is sent |
208 // The stream sent from pc4 to pc3 is cloned from stream the stream received | 208 // back to pc1. |
209 // on pc2. | 209 #if defined(THREAD_SANITIZER) |
210 #if defined(THREAD_SANITIZER) || defined(OS_WIN) | |
211 // Flaky on TSAN v2. http://crbug.com/373637 | 210 // 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 | 211 #else |
216 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream | 212 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream |
217 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p | |
218 #endif | 213 #endif |
219 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { | 214 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { |
220 #if defined (OS_ANDROID) | 215 #if defined (OS_ANDROID) |
221 // This test fails on Nexus 5 devices. | 216 // This test fails on Nexus 5 devices. |
222 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | 217 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 |
223 // for details. | 218 // for details. |
224 base::CommandLine::ForCurrentProcess()->AppendSwitch( | 219 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
225 switches::kDisableWebRtcHWDecoding); | 220 switches::kDisableWebRtcHWDecoding); |
226 #endif | 221 #endif |
227 MakeTypicalPeerConnectionCall( | 222 MakeTypicalPeerConnectionCall( |
228 "callAndForwardRemoteStream({video: true, audio: false});"); | 223 "callAndForwardRemoteStream({video: true, audio: false});"); |
229 } | 224 } |
230 | 225 |
231 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, | 226 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) { | 227 NoCrashWhenConnectChromiumSinkToRemoteTrack) { |
247 MakeTypicalPeerConnectionCall("ConnectChromiumSinkToRemoteAudioTrack();"); | 228 MakeTypicalPeerConnectionCall("ConnectChromiumSinkToRemoteAudioTrack();"); |
248 } | 229 } |
249 | 230 |
250 // This test will make a complete PeerConnection-based call but remove the | 231 // This test will make a complete PeerConnection-based call but remove the |
251 // MSID and bundle attribute from the initial offer to verify that | 232 // 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 | 233 // 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 | 234 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 |
254 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 235 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
255 // Timing out on ARM linux, see http://crbug.com/240373 | 236 // Timing out on ARM linux, see http://crbug.com/240373 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 | 424 |
444 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { | 425 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
445 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); | 426 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); |
446 } | 427 } |
447 | 428 |
448 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { | 429 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { |
449 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); | 430 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); |
450 } | 431 } |
451 | 432 |
452 } // namespace content | 433 } // namespace content |
OLD | NEW |