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

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

Issue 13496009: Hookup the MediaStream glue for Adding and Removing tracks to an existing MediaStream. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed code review comments and added unit test. Not updated content_browsertests. Created 7 years, 8 months 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 | Annotate | Revision Log
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/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "content/public/test/browser_test_utils.h" 9 #include "content/public/test/browser_test_utils.h"
10 #include "content/shell/shell.h" 10 #include "content/shell/shell.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetAudioAndVideoStreamAndStop) { 58 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetAudioAndVideoStreamAndStop) {
59 GURL url(test_server()->GetURL("files/media/getusermedia_and_stop.html")); 59 GURL url(test_server()->GetURL("files/media/getusermedia_and_stop.html"));
60 NavigateToURL(shell(), url); 60 NavigateToURL(shell(), url);
61 61
62 EXPECT_TRUE(ExecuteJavascript("getUserMedia({video: true, audio: true});")); 62 EXPECT_TRUE(ExecuteJavascript("getUserMedia({video: true, audio: true});"));
63 63
64 ExpectTitle("OK"); 64 ExpectTitle("OK");
65 } 65 }
66 66
67 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CloneAudioAndVideoStreamAndStop) {
68 GURL url(test_server()->GetURL("files/media/getusermedia_and_stop.html"));
69 NavigateToURL(shell(), url);
70
71 EXPECT_TRUE(ExecuteJavascript("createCloneStream();"));
72
73 ExpectTitle("OK");
74 }
75
67 // These tests will make a complete PeerConnection-based call and verify that 76 // These tests will make a complete PeerConnection-based call and verify that
68 // video is playing for the call. 77 // video is playing for the call.
69 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CanSetupVideoCall) { 78 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CanSetupVideoCall) {
70 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); 79 GURL url(test_server()->GetURL("files/media/peerconnection-call.html"));
71 NavigateToURL(shell(), url); 80 NavigateToURL(shell(), url);
72 81
73 EXPECT_TRUE(ExecuteJavascript("call({video: true});")); 82 EXPECT_TRUE(ExecuteJavascript("call({video: true});"));
74 ExpectTitle("OK"); 83 ExpectTitle("OK");
75 } 84 }
76 85
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 // TODO(perkj): Fix flakiness. See: http://crbug.com/227409 149 // TODO(perkj): Fix flakiness. See: http://crbug.com/227409
141 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, 150 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest,
142 DISABLED_CallWithDataAndLaterAddMedia) { 151 DISABLED_CallWithDataAndLaterAddMedia) {
143 GURL url(test_server()->GetURL("files/media/peerconnection-call.html")); 152 GURL url(test_server()->GetURL("files/media/peerconnection-call.html"));
144 NavigateToURL(shell(), url); 153 NavigateToURL(shell(), url);
145 154
146 EXPECT_TRUE(ExecuteJavascript("callWithDataAndLaterAddMedia();")); 155 EXPECT_TRUE(ExecuteJavascript("callWithDataAndLaterAddMedia();"));
147 ExpectTitle("OK"); 156 ExpectTitle("OK");
148 } 157 }
149 158
159 // This test will make a PeerConnection-based call and send a new Video
160 // MediaStream that has been created based on a MediaStream created with
161 // getUserMedia.
162 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, CallWithNewVideoMediaStream) {
163 GURL url(test_server()->GetURL("files/media/peerconnection-call.html"));
164 NavigateToURL(shell(), url);
165
166 EXPECT_TRUE(ExecuteJavascript("callWithNewVideoMediaStream();"));
167 ExpectTitle("OK");
168 }
169
150 } // namespace content 170 } // namespace content
151 171
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/media_stream_center.h » ('j') | content/renderer/media/media_stream_center.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698