Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: content/browser/media/webrtc_browsertest.cc

Issue 47923023: Automate WebRTC-in-Chrome test cases (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: corrected string Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 to verify that
phoglund_chromium 2013/11/04 09:34:56 Nit: This sentence is a bit convoluted and hard to
elham 2013/11/07 23:48:00 Done.
237 // SetLocalDescription fails when trying to negotiate with an unsupported
238 // video codec
239 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
240 NegotiateUnsupportedVideoCodec) {
241 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
242
243 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
244 NavigateToURL(shell(), url);
245
246 EXPECT_TRUE(ExecuteJavascript("negotiateUnsupportedVideoCodec();"));
247 ExpectTitle("OK");
248 }
249
250 // This test will modify the sdp offer to verify that SetLocalDescription
phoglund_chromium 2013/11/04 09:34:56 Nit: rewrite this sentence like the one above.
elham 2013/11/07 23:48:00 Done.
251 // fails when trying to negotiate a call with one peer that does not
252 // support encryption.
253 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, NegotiateNonCryptoCall) {
254 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
255
256 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
257 NavigateToURL(shell(), url);
258
259 EXPECT_TRUE(ExecuteJavascript("negotiateNonCryptoCall();"));
260 ExpectTitle("OK");
261 }
262
236 // This test will make a PeerConnection-based call and test an unreliable text 263 // This test will make a PeerConnection-based call and test an unreliable text
237 // dataChannel. 264 // dataChannel.
238 // TODO(mallinath) - Remove this test after rtp based data channel is disabled. 265 // TODO(mallinath) - Remove this test after rtp based data channel is disabled.
239 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) { 266 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithDataOnly) {
240 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); 267 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady());
241 268
242 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 269 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
243 NavigateToURL(shell(), url); 270 NavigateToURL(shell(), url);
244 271
245 EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();")); 272 EXPECT_TRUE(ExecuteJavascript("callWithDataOnly();"));
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 439
413 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); 440 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
414 NavigateToURL(shell(), url); 441 NavigateToURL(shell(), url);
415 442
416 EXPECT_TRUE( 443 EXPECT_TRUE(
417 ExecuteJavascript("addTwoMediaStreamsToOneConnection();")); 444 ExecuteJavascript("addTwoMediaStreamsToOneConnection();"));
418 ExpectTitle("OK"); 445 ExpectTitle("OK");
419 } 446 }
420 447
421 } // namespace content 448 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/test/data/media/peerconnection-call.html » ('j') | content/test/data/media/peerconnection-call.html » ('J')

Powered by Google App Engine
This is Rietveld 408576698