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/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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
47 // see that the success callback is called. If the error callback is called or | 47 // see that the success callback is called. If the error callback is called or |
48 // none of the callbacks are called the tests will simply time out and fail. | 48 // none of the callbacks are called the tests will simply time out and fail. |
49 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetVideoStreamAndStop) { | 49 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetVideoStreamAndStop) { |
50 GURL url(test_server()->GetURL("files/media/getusermedia_and_stop.html")); | 50 GURL url(test_server()->GetURL("files/media/getusermedia_and_stop.html")); |
51 NavigateToURL(shell(), url); | 51 NavigateToURL(shell(), url); |
52 | 52 |
53 EXPECT_TRUE(ExecuteJavascript("getUserMedia({video: true});")); | 53 EXPECT_TRUE(ExecuteJavascript("getUserMedia({video: true});")); |
54 | 54 |
55 ExpectTitle("OK"); | 55 ExpectTitle("OK"); |
56 } | 56 } |
57 | 57 |
phoglund_chromium
2013/04/09 13:16:28
The test no longer stops anything, so this name is
perkj_chrome
2013/04/11 10:12:41
This is testing stop in the same way as before.
| |
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 Loading... | |
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 |
OLD | NEW |