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/file_util.h" | 6 #include "base/file_util.h" |
7 #include "base/process/process_handle.h" | 7 #include "base/process/process_handle.h" |
8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 return false; | 47 return false; |
48 it.Advance(); | 48 it.Advance(); |
49 EXPECT_TRUE(it.IsAtEnd()); | 49 EXPECT_TRUE(it.IsAtEnd()); |
50 return it.IsAtEnd(); | 50 return it.IsAtEnd(); |
51 } | 51 } |
52 | 52 |
53 } // namespace | 53 } // namespace |
54 | 54 |
55 namespace content { | 55 namespace content { |
56 | 56 |
57 class WebRtcBrowserTest : public WebRtcContentBrowserTest, | 57 class WebRtcBrowserTest : public WebRtcContentBrowserTest { |
58 public testing::WithParamInterface<bool> { | |
59 public: | 58 public: |
60 WebRtcBrowserTest() {} | 59 WebRtcBrowserTest() {} |
61 virtual ~WebRtcBrowserTest() {} | 60 virtual ~WebRtcBrowserTest() {} |
62 | 61 |
63 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { | |
64 WebRtcContentBrowserTest::SetUpCommandLine(command_line); | |
65 | |
66 bool enable_audio_track_processing = GetParam(); | |
67 if (!enable_audio_track_processing) | |
68 command_line->AppendSwitch(switches::kDisableAudioTrackProcessing); | |
69 } | |
70 | |
71 // Convenience function since most peerconnection-call.html tests just load | 62 // Convenience function since most peerconnection-call.html tests just load |
72 // the page, kick off some javascript and wait for the title to change to OK. | 63 // the page, kick off some javascript and wait for the title to change to OK. |
73 void MakeTypicalPeerConnectionCall(const std::string& javascript) { | 64 void MakeTypicalPeerConnectionCall(const std::string& javascript) { |
74 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 65 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
75 | 66 |
76 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 67 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
77 NavigateToURL(shell(), url); | 68 NavigateToURL(shell(), url); |
78 | 69 |
79 DisableOpusIfOnAndroid(); | 70 DisableOpusIfOnAndroid(); |
80 ExecuteJavascriptAndWaitForOk(javascript); | 71 ExecuteJavascriptAndWaitForOk(javascript); |
(...skipping 22 matching lines...) Expand all Loading... |
103 | 94 |
104 void DisableOpusIfOnAndroid() { | 95 void DisableOpusIfOnAndroid() { |
105 #if defined(OS_ANDROID) | 96 #if defined(OS_ANDROID) |
106 // Always force iSAC 16K on Android for now (Opus is broken). | 97 // Always force iSAC 16K on Android for now (Opus is broken). |
107 EXPECT_EQ("isac-forced", | 98 EXPECT_EQ("isac-forced", |
108 ExecuteJavascriptAndReturnResult("forceIsac16KInSdp();")); | 99 ExecuteJavascriptAndReturnResult("forceIsac16KInSdp();")); |
109 #endif | 100 #endif |
110 } | 101 } |
111 }; | 102 }; |
112 | 103 |
113 static const bool kRunTestsWithFlag[] = { false, true }; | |
114 INSTANTIATE_TEST_CASE_P(WebRtcBrowserTests, | |
115 WebRtcBrowserTest, | |
116 testing::ValuesIn(kRunTestsWithFlag)); | |
117 | |
118 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 104 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
119 // Timing out on ARM linux bot: http://crbug.com/238490 | 105 // Timing out on ARM linux bot: http://crbug.com/238490 |
120 #define MAYBE_CanSetupDefaultVideoCall DISABLED_CanSetupDefaultVideoCall | 106 #define MAYBE_CanSetupDefaultVideoCall DISABLED_CanSetupDefaultVideoCall |
121 #else | 107 #else |
122 #define MAYBE_CanSetupDefaultVideoCall CanSetupDefaultVideoCall | 108 #define MAYBE_CanSetupDefaultVideoCall CanSetupDefaultVideoCall |
123 #endif | 109 #endif |
124 | 110 |
125 // These tests will make a complete PeerConnection-based call and verify that | 111 // These tests will make a complete PeerConnection-based call and verify that |
126 // video is playing for the call. | 112 // video is playing for the call. |
127 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupDefaultVideoCall) { | 113 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupDefaultVideoCall) { |
128 MakeTypicalPeerConnectionCall( | 114 MakeTypicalPeerConnectionCall( |
129 "callAndExpectResolution({video: true}, 640, 480);"); | 115 "callAndExpectResolution({video: true}, 640, 480);"); |
130 } | 116 } |
131 | 117 |
132 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CanSetupVideoCallWith1To1AspecRatio) { | 118 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CanSetupVideoCallWith1To1AspecRatio) { |
133 const std::string javascript = | 119 const std::string javascript = |
134 "callAndExpectResolution({video: {mandatory: {minWidth: 320," | 120 "callAndExpectResolution({video: {mandatory: {minWidth: 320," |
135 " maxWidth: 320, minHeight: 320, maxHeight: 320}}}, 320, 320);"; | 121 " maxWidth: 320, minHeight: 320, maxHeight: 320}}}, 320, 320);"; |
136 MakeTypicalPeerConnectionCall(javascript); | 122 MakeTypicalPeerConnectionCall(javascript); |
137 } | 123 } |
138 | 124 |
139 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 125 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
140 CanSetupVideoCallWith16To9AspecRatio) { | 126 CanSetupVideoCallWith16To9AspecRatio) { |
141 const std::string javascript = | 127 const std::string javascript = |
142 "callAndExpectResolution({video: {mandatory: {minWidth: 640," | 128 "callAndExpectResolution({video: {mandatory: {minWidth: 640," |
143 " maxWidth: 640, minAspectRatio: 1.777}}}, 640, 360);"; | 129 " maxWidth: 640, minAspectRatio: 1.777}}}, 640, 360);"; |
144 MakeTypicalPeerConnectionCall(javascript); | 130 MakeTypicalPeerConnectionCall(javascript); |
145 } | 131 } |
146 | 132 |
147 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 133 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
148 CanSetupVideoCallWith4To3AspecRatio) { | 134 CanSetupVideoCallWith4To3AspecRatio) { |
149 const std::string javascript = | 135 const std::string javascript = |
150 "callAndExpectResolution({video: {mandatory: {minWidth: 960," | 136 "callAndExpectResolution({video: {mandatory: {minWidth: 960," |
151 "maxAspectRatio: 1.333}}}, 960, 720);"; | 137 "maxAspectRatio: 1.333}}}, 960, 720);"; |
152 MakeTypicalPeerConnectionCall(javascript); | 138 MakeTypicalPeerConnectionCall(javascript); |
153 } | 139 } |
154 | 140 |
155 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 141 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
156 // Timing out on ARM linux, see http://crbug.com/240376 | 142 // Timing out on ARM linux, see http://crbug.com/240376 |
157 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall | 143 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall |
158 #else | 144 #else |
159 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall | 145 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall |
160 #endif | 146 #endif |
161 | 147 |
162 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { | 148 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { |
163 MakeTypicalPeerConnectionCall("call({video: true, audio: true});"); | 149 MakeTypicalPeerConnectionCall("call({video: true, audio: true});"); |
164 } | 150 } |
165 | 151 |
166 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { | 152 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { |
167 MakeTypicalPeerConnectionCall("callAndSendDtmf(\'123,abc\');"); | 153 MakeTypicalPeerConnectionCall("callAndSendDtmf(\'123,abc\');"); |
168 } | 154 } |
169 | 155 |
170 // TODO(phoglund): this test fails because the peer connection state will be | 156 // TODO(phoglund): this test fails because the peer connection state will be |
171 // stable in the second negotiation round rather than have-local-offer. | 157 // stable in the second negotiation round rather than have-local-offer. |
172 // http://crbug.com/293125. | 158 // http://crbug.com/293125. |
173 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 159 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
174 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) { | 160 DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) { |
175 const char* kJavascript = | 161 const char* kJavascript = |
176 "callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});"; | 162 "callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});"; |
177 MakeTypicalPeerConnectionCall(kJavascript); | 163 MakeTypicalPeerConnectionCall(kJavascript); |
178 } | 164 } |
179 | 165 |
180 // Below 2 test will make a complete PeerConnection-based call between pc1 and | 166 // Below 2 test will make a complete PeerConnection-based call between pc1 and |
181 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and | 167 // pc2, and then use the remote stream to setup a call between pc3 and pc4, and |
182 // then verify that video is received on pc3 and pc4. | 168 // then verify that video is received on pc3 and pc4. |
183 // The stream sent from pc3 to pc4 is the stream received on pc1. | 169 // The stream sent from pc3 to pc4 is the stream received on pc1. |
184 // The stream sent from pc4 to pc3 is cloned from stream the stream received | 170 // The stream sent from pc4 to pc3 is cloned from stream the stream received |
185 // on pc2. | 171 // on pc2. |
186 // Flaky on win xp. http://crbug.com/304775 | 172 // Flaky on win xp. http://crbug.com/304775 |
187 #if defined(OS_WIN) | 173 #if defined(OS_WIN) |
188 #define MAYBE_CanForwardRemoteStream DISABLED_CanForwardRemoteStream | 174 #define MAYBE_CanForwardRemoteStream DISABLED_CanForwardRemoteStream |
189 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p | 175 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p |
190 #else | 176 #else |
191 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream | 177 #define MAYBE_CanForwardRemoteStream CanForwardRemoteStream |
192 // Flaky on TSAN v2. http://crbug.com/373637 | 178 // Flaky on TSAN v2. http://crbug.com/373637 |
193 #if defined(THREAD_SANITIZER) | 179 #if defined(THREAD_SANITIZER) |
194 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p | 180 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p |
195 #else | 181 #else |
196 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p | 182 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p |
197 #endif | 183 #endif |
198 #endif | 184 #endif |
199 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { | 185 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { |
200 #if defined (OS_ANDROID) | 186 #if defined (OS_ANDROID) |
201 // This test fails on Nexus 5 devices. | 187 // This test fails on Nexus 5 devices. |
202 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | 188 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 |
203 // for details. | 189 // for details. |
204 CommandLine::ForCurrentProcess()->AppendSwitch( | 190 CommandLine::ForCurrentProcess()->AppendSwitch( |
205 switches::kDisableWebRtcHWDecoding); | 191 switches::kDisableWebRtcHWDecoding); |
206 #endif | 192 #endif |
207 MakeTypicalPeerConnectionCall( | 193 MakeTypicalPeerConnectionCall( |
208 "callAndForwardRemoteStream({video: true, audio: false});"); | 194 "callAndForwardRemoteStream({video: true, audio: false});"); |
209 } | 195 } |
210 | 196 |
211 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { | 197 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { |
212 #if defined (OS_ANDROID) | 198 #if defined (OS_ANDROID) |
213 // This test fails on Nexus 5 devices. | 199 // This test fails on Nexus 5 devices. |
214 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | 200 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 |
215 // for details. | 201 // for details. |
216 CommandLine::ForCurrentProcess()->AppendSwitch( | 202 CommandLine::ForCurrentProcess()->AppendSwitch( |
217 switches::kDisableWebRtcHWDecoding); | 203 switches::kDisableWebRtcHWDecoding); |
218 #endif | 204 #endif |
219 const std::string javascript = GenerateGetUserMediaCall( | 205 const std::string javascript = GenerateGetUserMediaCall( |
220 "callAndForwardRemoteStream", 1280, 1280, 720, 720, 10, 30); | 206 "callAndForwardRemoteStream", 1280, 1280, 720, 720, 10, 30); |
221 MakeTypicalPeerConnectionCall(javascript); | 207 MakeTypicalPeerConnectionCall(javascript); |
222 } | 208 } |
223 | 209 |
224 // This test will make a complete PeerConnection-based call but remove the | 210 // This test will make a complete PeerConnection-based call but remove the |
225 // MSID and bundle attribute from the initial offer to verify that | 211 // MSID and bundle attribute from the initial offer to verify that |
226 // video is playing for the call even if the initiating client don't support | 212 // video is playing for the call even if the initiating client don't support |
227 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 | 213 // MSID. http://tools.ietf.org/html/draft-alvestrand-rtcweb-msid-02 |
228 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 214 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
229 // Timing out on ARM linux, see http://crbug.com/240373 | 215 // Timing out on ARM linux, see http://crbug.com/240373 |
230 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ | 216 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ |
231 DISABLED_CanSetupAudioAndVideoCallWithoutMsidAndBundle | 217 DISABLED_CanSetupAudioAndVideoCallWithoutMsidAndBundle |
232 #else | 218 #else |
233 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ | 219 #define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ |
234 CanSetupAudioAndVideoCallWithoutMsidAndBundle | 220 CanSetupAudioAndVideoCallWithoutMsidAndBundle |
235 #endif | 221 #endif |
236 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 222 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
237 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { | 223 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { |
238 MakeTypicalPeerConnectionCall("callWithoutMsidAndBundle();"); | 224 MakeTypicalPeerConnectionCall("callWithoutMsidAndBundle();"); |
239 } | 225 } |
240 | 226 |
241 // This test will modify the SDP offer to an unsupported codec, which should | 227 // This test will modify the SDP offer to an unsupported codec, which should |
242 // cause SetLocalDescription to fail. | 228 // cause SetLocalDescription to fail. |
243 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, NegotiateUnsupportedVideoCodec) { | 229 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, NegotiateUnsupportedVideoCodec) { |
244 MakeTypicalPeerConnectionCall("negotiateUnsupportedVideoCodec();"); | 230 MakeTypicalPeerConnectionCall("negotiateUnsupportedVideoCodec();"); |
245 } | 231 } |
246 | 232 |
247 // This test will modify the SDP offer to use no encryption, which should | 233 // This test will modify the SDP offer to use no encryption, which should |
248 // cause SetLocalDescription to fail. | 234 // cause SetLocalDescription to fail. |
249 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, NegotiateNonCryptoCall) { | 235 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, NegotiateNonCryptoCall) { |
250 MakeTypicalPeerConnectionCall("negotiateNonCryptoCall();"); | 236 MakeTypicalPeerConnectionCall("negotiateNonCryptoCall();"); |
251 } | 237 } |
252 | 238 |
253 // This test can negotiate an SDP offer that includes a b=AS:xx to control | 239 // This test can negotiate an SDP offer that includes a b=AS:xx to control |
254 // the bandwidth for audio and video | 240 // the bandwidth for audio and video |
255 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, NegotiateOfferWithBLine) { | 241 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, NegotiateOfferWithBLine) { |
256 MakeTypicalPeerConnectionCall("negotiateOfferWithBLine();"); | 242 MakeTypicalPeerConnectionCall("negotiateOfferWithBLine();"); |
257 } | 243 } |
258 | 244 |
259 // This test will make a complete PeerConnection-based call using legacy SDP | 245 // This test will make a complete PeerConnection-based call using legacy SDP |
260 // settings: GIce, external SDES, and no BUNDLE. | 246 // settings: GIce, external SDES, and no BUNDLE. |
261 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 247 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
262 // Timing out on ARM linux, see http://crbug.com/240373 | 248 // Timing out on ARM linux, see http://crbug.com/240373 |
263 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall | 249 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall |
264 #else | 250 #else |
265 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall | 251 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall |
266 #endif | 252 #endif |
267 | 253 |
268 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupLegacyCall) { | 254 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupLegacyCall) { |
269 MakeTypicalPeerConnectionCall("callWithLegacySdp();"); | 255 MakeTypicalPeerConnectionCall("callWithLegacySdp();"); |
270 } | 256 } |
271 | 257 |
272 // This test will make a PeerConnection-based call and test an unreliable text | 258 // This test will make a PeerConnection-based call and test an unreliable text |
273 // dataChannel. | 259 // dataChannel. |
274 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. | 260 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. |
275 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallWithDataOnly) { | 261 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallWithDataOnly) { |
276 MakeTypicalPeerConnectionCall("callWithDataOnly();"); | 262 MakeTypicalPeerConnectionCall("callWithDataOnly();"); |
277 } | 263 } |
278 | 264 |
279 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallWithSctpDataOnly) { | 265 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallWithSctpDataOnly) { |
280 MakeTypicalPeerConnectionCall("callWithSctpDataOnly();"); | 266 MakeTypicalPeerConnectionCall("callWithSctpDataOnly();"); |
281 } | 267 } |
282 | 268 |
283 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 269 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
284 // Timing out on ARM linux bot: http://crbug.com/238490 | 270 // Timing out on ARM linux bot: http://crbug.com/238490 |
285 #define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia | 271 #define MAYBE_CallWithDataAndMedia DISABLED_CallWithDataAndMedia |
286 #else | 272 #else |
287 #define MAYBE_CallWithDataAndMedia CallWithDataAndMedia | 273 #define MAYBE_CallWithDataAndMedia CallWithDataAndMedia |
288 #endif | 274 #endif |
289 | 275 |
290 // This test will make a PeerConnection-based call and test an unreliable text | 276 // This test will make a PeerConnection-based call and test an unreliable text |
291 // dataChannel and audio and video tracks. | 277 // dataChannel and audio and video tracks. |
292 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. | 278 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. |
293 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, DISABLED_CallWithDataAndMedia) { | 279 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, DISABLED_CallWithDataAndMedia) { |
294 MakeTypicalPeerConnectionCall("callWithDataAndMedia();"); | 280 MakeTypicalPeerConnectionCall("callWithDataAndMedia();"); |
295 } | 281 } |
296 | 282 |
297 | 283 |
298 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 284 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
299 // Timing out on ARM linux bot: http://crbug.com/238490 | 285 // Timing out on ARM linux bot: http://crbug.com/238490 |
300 #define MAYBE_CallWithSctpDataAndMedia DISABLED_CallWithSctpDataAndMedia | 286 #define MAYBE_CallWithSctpDataAndMedia DISABLED_CallWithSctpDataAndMedia |
301 #else | 287 #else |
302 #define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia | 288 #define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia |
303 #endif | 289 #endif |
304 | 290 |
305 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 291 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
306 MAYBE_CallWithSctpDataAndMedia) { | 292 MAYBE_CallWithSctpDataAndMedia) { |
307 MakeTypicalPeerConnectionCall("callWithSctpDataAndMedia();"); | 293 MakeTypicalPeerConnectionCall("callWithSctpDataAndMedia();"); |
308 } | 294 } |
309 | 295 |
310 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 296 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
311 // Timing out on ARM linux bot: http://crbug.com/238490 | 297 // Timing out on ARM linux bot: http://crbug.com/238490 |
312 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia | 298 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia |
313 #else | 299 #else |
314 // Temporarily disable the test on all platforms. http://crbug.com/293252 | 300 // Temporarily disable the test on all platforms. http://crbug.com/293252 |
315 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia | 301 #define MAYBE_CallWithDataAndLaterAddMedia DISABLED_CallWithDataAndLaterAddMedia |
316 #endif | 302 #endif |
317 | 303 |
318 // This test will make a PeerConnection-based call and test an unreliable text | 304 // This test will make a PeerConnection-based call and test an unreliable text |
319 // dataChannel and later add an audio and video track. | 305 // dataChannel and later add an audio and video track. |
320 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) { | 306 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) { |
321 MakeTypicalPeerConnectionCall("callWithDataAndLaterAddMedia();"); | 307 MakeTypicalPeerConnectionCall("callWithDataAndLaterAddMedia();"); |
322 } | 308 } |
323 | 309 |
324 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 310 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
325 // Timing out on ARM linux bot: http://crbug.com/238490 | 311 // Timing out on ARM linux bot: http://crbug.com/238490 |
326 #define MAYBE_CallWithNewVideoMediaStream DISABLED_CallWithNewVideoMediaStream | 312 #define MAYBE_CallWithNewVideoMediaStream DISABLED_CallWithNewVideoMediaStream |
327 #else | 313 #else |
328 #define MAYBE_CallWithNewVideoMediaStream CallWithNewVideoMediaStream | 314 #define MAYBE_CallWithNewVideoMediaStream CallWithNewVideoMediaStream |
329 #endif | 315 #endif |
330 | 316 |
331 // This test will make a PeerConnection-based call and send a new Video | 317 // This test will make a PeerConnection-based call and send a new Video |
332 // MediaStream that has been created based on a MediaStream created with | 318 // MediaStream that has been created based on a MediaStream created with |
333 // getUserMedia. | 319 // getUserMedia. |
334 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { | 320 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { |
335 MakeTypicalPeerConnectionCall("callWithNewVideoMediaStream();"); | 321 MakeTypicalPeerConnectionCall("callWithNewVideoMediaStream();"); |
336 } | 322 } |
337 | 323 |
338 // This test will make a PeerConnection-based call and send a new Video | 324 // This test will make a PeerConnection-based call and send a new Video |
339 // MediaStream that has been created based on a MediaStream created with | 325 // MediaStream that has been created based on a MediaStream created with |
340 // getUserMedia. When video is flowing, the VideoTrack is removed and an | 326 // getUserMedia. When video is flowing, the VideoTrack is removed and an |
341 // AudioTrack is added instead. | 327 // AudioTrack is added instead. |
342 // TODO(phoglund): This test is manual since not all buildbots has an audio | 328 // TODO(phoglund): This test is manual since not all buildbots has an audio |
343 // input. | 329 // input. |
344 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MANUAL_CallAndModifyStream) { | 330 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MANUAL_CallAndModifyStream) { |
345 MakeTypicalPeerConnectionCall( | 331 MakeTypicalPeerConnectionCall( |
346 "callWithNewVideoMediaStreamLaterSwitchToAudio();"); | 332 "callWithNewVideoMediaStreamLaterSwitchToAudio();"); |
347 } | 333 } |
348 | 334 |
349 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, AddTwoMediaStreamsToOnePC) { | 335 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, AddTwoMediaStreamsToOnePC) { |
350 MakeTypicalPeerConnectionCall("addTwoMediaStreamsToOneConnection();"); | 336 MakeTypicalPeerConnectionCall("addTwoMediaStreamsToOneConnection();"); |
351 } | 337 } |
352 | 338 |
353 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 339 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
354 EstablishAudioVideoCallAndEnsureAudioIsPlaying) { | 340 EstablishAudioVideoCallAndEnsureAudioIsPlaying) { |
355 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( | 341 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( |
356 "callAndEnsureAudioIsPlaying(%s, {audio:true, video:true});", | 342 "callAndEnsureAudioIsPlaying(%s, {audio:true, video:true});", |
357 kUseLenientAudioChecking)); | 343 kUseLenientAudioChecking)); |
358 } | 344 } |
359 | 345 |
360 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 346 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
361 EstablishAudioOnlyCallAndEnsureAudioIsPlaying) { | 347 EstablishAudioOnlyCallAndEnsureAudioIsPlaying) { |
362 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( | 348 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( |
363 "callAndEnsureAudioIsPlaying(%s, {audio:true});", | 349 "callAndEnsureAudioIsPlaying(%s, {audio:true});", |
364 kUseLenientAudioChecking)); | 350 kUseLenientAudioChecking)); |
365 } | 351 } |
366 | 352 |
367 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 353 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
368 EstablishAudioVideoCallAndVerifyMutingWorks) { | 354 EstablishAudioVideoCallAndVerifyMutingWorks) { |
369 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( | 355 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( |
370 "callAndEnsureAudioTrackMutingWorks(%s);", kUseLenientAudioChecking)); | 356 "callAndEnsureAudioTrackMutingWorks(%s);", kUseLenientAudioChecking)); |
371 } | 357 } |
372 | 358 |
373 // Flaky on TSAN v2: http://crbug.com/373637 | 359 // Flaky on TSAN v2: http://crbug.com/373637 |
374 #if defined(THREAD_SANITIZER) | 360 #if defined(THREAD_SANITIZER) |
375 #define MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks\ | 361 #define MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks\ |
376 DISABLED_EstablishAudioVideoCallAndVerifyUnmutingWorks | 362 DISABLED_EstablishAudioVideoCallAndVerifyUnmutingWorks |
377 #else | 363 #else |
378 #define MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks\ | 364 #define MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks\ |
379 EstablishAudioVideoCallAndVerifyUnmutingWorks | 365 EstablishAudioVideoCallAndVerifyUnmutingWorks |
380 #endif | 366 #endif |
381 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 367 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
382 MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks) { | 368 MAYBE_EstablishAudioVideoCallAndVerifyUnmutingWorks) { |
383 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( | 369 MakeAudioDetectingPeerConnectionCall(base::StringPrintf( |
384 "callAndEnsureAudioTrackUnmutingWorks(%s);", kUseLenientAudioChecking)); | 370 "callAndEnsureAudioTrackUnmutingWorks(%s);", kUseLenientAudioChecking)); |
385 } | 371 } |
386 | 372 |
387 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { | 373 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
388 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); | 374 MakeTypicalPeerConnectionCall("callAndEnsureVideoTrackMutingWorks();"); |
389 } | 375 } |
390 | 376 |
391 #if defined(OS_WIN) | 377 #if defined(OS_WIN) |
392 #define IntToStringType base::IntToString16 | 378 #define IntToStringType base::IntToString16 |
393 #else | 379 #else |
394 #define IntToStringType base::IntToString | 380 #define IntToStringType base::IntToString |
395 #endif | 381 #endif |
396 | 382 |
397 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 383 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
398 // Timing out on ARM linux bot: http://crbug.com/238490 | 384 // Timing out on ARM linux bot: http://crbug.com/238490 |
399 #define MAYBE_CallWithAecDump DISABLED_CallWithAecDump | 385 #define MAYBE_CallWithAecDump DISABLED_CallWithAecDump |
400 #else | 386 #else |
401 #define MAYBE_CallWithAecDump CallWithAecDump | 387 #define MAYBE_CallWithAecDump CallWithAecDump |
402 #endif | 388 #endif |
403 | 389 |
404 // This tests will make a complete PeerConnection-based call, verify that | 390 // This tests will make a complete PeerConnection-based call, verify that |
405 // video is playing for the call, and verify that a non-empty AEC dump file | 391 // video is playing for the call, and verify that a non-empty AEC dump file |
406 // exists. The AEC dump is enabled through webrtc-internals. The HTML and | 392 // exists. The AEC dump is enabled through webrtc-internals. The HTML and |
407 // Javascript is bypassed since it would trigger a file picker dialog. Instead, | 393 // Javascript is bypassed since it would trigger a file picker dialog. Instead, |
408 // the dialog callback FileSelected() is invoked directly. In fact, there's | 394 // the dialog callback FileSelected() is invoked directly. In fact, there's |
409 // never a webrtc-internals page opened at all since that's not needed. | 395 // never a webrtc-internals page opened at all since that's not needed. |
410 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithAecDump) { | 396 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithAecDump) { |
411 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 397 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
412 | 398 |
413 // We must navigate somewhere first so that the render process is created. | 399 // We must navigate somewhere first so that the render process is created. |
414 NavigateToURL(shell(), GURL("")); | 400 NavigateToURL(shell(), GURL("")); |
415 | 401 |
416 base::FilePath dump_file; | 402 base::FilePath dump_file; |
417 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); | 403 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); |
418 base::DeleteFile(dump_file, false); | 404 base::DeleteFile(dump_file, false); |
419 | 405 |
420 // This fakes the behavior of another open tab with webrtc-internals, and | 406 // This fakes the behavior of another open tab with webrtc-internals, and |
(...skipping 28 matching lines...) Expand all Loading... |
449 | 435 |
450 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 436 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
451 // Timing out on ARM linux bot: http://crbug.com/238490 | 437 // Timing out on ARM linux bot: http://crbug.com/238490 |
452 #define MAYBE_CallWithAecDumpEnabledThenDisabled DISABLED_CallWithAecDumpEnabled
ThenDisabled | 438 #define MAYBE_CallWithAecDumpEnabledThenDisabled DISABLED_CallWithAecDumpEnabled
ThenDisabled |
453 #else | 439 #else |
454 #define MAYBE_CallWithAecDumpEnabledThenDisabled CallWithAecDumpEnabledThenDisab
led | 440 #define MAYBE_CallWithAecDumpEnabledThenDisabled CallWithAecDumpEnabledThenDisab
led |
455 #endif | 441 #endif |
456 | 442 |
457 // As above, but enable and disable dump before starting a call. The file should | 443 // As above, but enable and disable dump before starting a call. The file should |
458 // be created, but should be empty. | 444 // be created, but should be empty. |
459 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 445 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
460 MAYBE_CallWithAecDumpEnabledThenDisabled) { | 446 MAYBE_CallWithAecDumpEnabledThenDisabled) { |
461 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 447 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
462 | 448 |
463 // We must navigate somewhere first so that the render process is created. | 449 // We must navigate somewhere first so that the render process is created. |
464 NavigateToURL(shell(), GURL("")); | 450 NavigateToURL(shell(), GURL("")); |
465 | 451 |
466 base::FilePath dump_file; | 452 base::FilePath dump_file; |
467 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); | 453 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); |
468 base::DeleteFile(dump_file, false); | 454 base::DeleteFile(dump_file, false); |
469 | 455 |
(...skipping 18 matching lines...) Expand all Loading... |
488 base::DeleteFile(dump_file, false); | 474 base::DeleteFile(dump_file, false); |
489 } | 475 } |
490 | 476 |
491 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 477 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
492 // Timing out on ARM linux bot: http://crbug.com/238490 | 478 // Timing out on ARM linux bot: http://crbug.com/238490 |
493 #define MAYBE_TwoCallsWithAecDump DISABLED_TwoCallsWithAecDump | 479 #define MAYBE_TwoCallsWithAecDump DISABLED_TwoCallsWithAecDump |
494 #else | 480 #else |
495 #define MAYBE_TwoCallsWithAecDump TwoCallsWithAecDump | 481 #define MAYBE_TwoCallsWithAecDump TwoCallsWithAecDump |
496 #endif | 482 #endif |
497 | 483 |
498 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_TwoCallsWithAecDump) { | 484 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_TwoCallsWithAecDump) { |
499 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 485 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
500 | 486 |
501 // We must navigate somewhere first so that the render process is created. | 487 // We must navigate somewhere first so that the render process is created. |
502 NavigateToURL(shell(), GURL("")); | 488 NavigateToURL(shell(), GURL("")); |
503 | 489 |
504 // Create a second window. | 490 // Create a second window. |
505 Shell* shell2 = CreateBrowser(); | 491 Shell* shell2 = CreateBrowser(); |
506 NavigateToURL(shell2, GURL("")); | 492 NavigateToURL(shell2, GURL("")); |
507 | 493 |
508 base::FilePath dump_file; | 494 base::FilePath dump_file; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 EXPECT_TRUE(base::PathExists(unique_dump_file)); | 528 EXPECT_TRUE(base::PathExists(unique_dump_file)); |
543 int64 file_size = 0; | 529 int64 file_size = 0; |
544 EXPECT_TRUE(base::GetFileSize(unique_dump_file, &file_size)); | 530 EXPECT_TRUE(base::GetFileSize(unique_dump_file, &file_size)); |
545 EXPECT_GT(file_size, 0); | 531 EXPECT_GT(file_size, 0); |
546 | 532 |
547 base::DeleteFile(unique_dump_file, false); | 533 base::DeleteFile(unique_dump_file, false); |
548 } | 534 } |
549 } | 535 } |
550 | 536 |
551 } // namespace content | 537 } // namespace content |
OLD | NEW |