| 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 | |
| 261 // This test can negotiate an SDP offer that includes a b=AS:xx to control | |
| 262 // the bandwidth for audio and video | |
| 263 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateOfferWithBLine) { | |
| 264 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | |
| 265 | |
| 266 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | |
| 267 NavigateToURL(shell(), url); | |
| 268 | |
| 269 EXPECT_TRUE(ExecuteJavascript("negotiateOfferWithBLine();")); | |
| 270 ExpectTitle("OK"); | |
| 271 } | |
| 272 | |
| 273 | |
| 274 // This test will make a complete PeerConnection-based call using legacy SDP | 236 // This test will make a complete PeerConnection-based call using legacy SDP |
| 275 // settings: GIce, external SDES, and no BUNDLE. | 237 // settings: GIce, external SDES, and no BUNDLE. |
| 276 #if defined(OS_WIN) && defined(USE_AURA) | 238 #if defined(OS_WIN) && defined(USE_AURA) |
| 277 // Disabled for win7_aura, see http://crbug.com/235089. | 239 // Disabled for win7_aura, see http://crbug.com/235089. |
| 278 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall | 240 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall |
| 279 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 241 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
| 280 // Timing out on ARM linux, see http://crbug.com/240373 | 242 // Timing out on ARM linux, see http://crbug.com/240373 |
| 281 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall | 243 #define MAYBE_CanSetupLegacyCall DISABLED_CanSetupLegacyCall |
| 282 #else | 244 #else |
| 283 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall | 245 #define MAYBE_CanSetupLegacyCall CanSetupLegacyCall |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 | 434 |
| 473 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 435 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
| 474 NavigateToURL(shell(), url); | 436 NavigateToURL(shell(), url); |
| 475 | 437 |
| 476 EXPECT_TRUE( | 438 EXPECT_TRUE( |
| 477 ExecuteJavascript("addTwoMediaStreamsToOneConnection();")); | 439 ExecuteJavascript("addTwoMediaStreamsToOneConnection();")); |
| 478 ExpectTitle("OK"); | 440 ExpectTitle("OK"); |
| 479 } | 441 } |
| 480 | 442 |
| 481 } // namespace content | 443 } // namespace content |
| OLD | NEW |