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/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "content/browser/web_contents/web_contents_impl.h" | 8 #include "content/browser/web_contents/web_contents_impl.h" |
9 #include "content/public/common/content_switches.h" | 9 #include "content/public/common/content_switches.h" |
10 #include "content/public/test/browser_test_utils.h" | 10 #include "content/public/test/browser_test_utils.h" |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { | 226 MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { |
227 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 227 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
228 | 228 |
229 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 229 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
230 NavigateToURL(shell(), url); | 230 NavigateToURL(shell(), url); |
231 | 231 |
232 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();")); | 232 EXPECT_TRUE(ExecuteJavascript("callWithoutMsidAndBundle();")); |
233 ExpectTitle("OK"); | 233 ExpectTitle("OK"); |
234 } | 234 } |
235 | 235 |
| 236 // This test will modify the SDP offer to an unsupported codec, which should |
| 237 // cause SetLocalDescription to fail. |
| 238 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, |
| 239 NegotiateUnsupportedVideoCodec) { |
| 240 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 241 |
| 242 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
| 243 NavigateToURL(shell(), url); |
| 244 |
| 245 EXPECT_TRUE(ExecuteJavascript("negotiateUnsupportedVideoCodec();")); |
| 246 ExpectTitle("OK"); |
| 247 } |
| 248 |
| 249 // This test will modify the SDP offer to use no encryption, which should |
| 250 // cause SetLocalDescription to fail. |
| 251 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateNonCryptoCall) { |
| 252 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
| 253 |
| 254 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
| 255 NavigateToURL(shell(), url); |
| 256 |
| 257 EXPECT_TRUE(ExecuteJavascript("negotiateNonCryptoCall();")); |
| 258 ExpectTitle("OK"); |
| 259 } |
| 260 |
236 // This test will make a complete PeerConnection-based call using legacy SDP | 261 // This test will make a complete PeerConnection-based call using legacy SDP |
237 // settings: GIce, external SDES, and no BUNDLE. | 262 // settings: GIce, external SDES, and no BUNDLE. |
238 #if defined(OS_WIN) && defined(USE_AURA) | 263 #if defined(OS_WIN) && defined(USE_AURA) |
239 // Disabled for win7_aura, see http://crbug.com/235089. | 264 // Disabled for win7_aura, see http://crbug.com/235089. |
240 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall | 265 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall |
241 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 266 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
242 // Timing out on ARM linux, see http://crbug.com/240373 | 267 // Timing out on ARM linux, see http://crbug.com/240373 |
243 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall | 268 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall |
244 #else | 269 #else |
245 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall | 270 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 | 459 |
435 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 460 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
436 NavigateToURL(shell(), url); | 461 NavigateToURL(shell(), url); |
437 | 462 |
438 EXPECT_TRUE( | 463 EXPECT_TRUE( |
439 ExecuteJavascript("addTwoMediaStreamsToOneConnection();")); | 464 ExecuteJavascript("addTwoMediaStreamsToOneConnection();")); |
440 ExpectTitle("OK"); | 465 ExpectTitle("OK"); |
441 } | 466 } |
442 | 467 |
443 } // namespace content | 468 } // namespace content |
OLD | NEW |