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/files/file_util.h" | 6 #include "base/files/file_util.h" |
7 #include "base/threading/platform_thread.h" | 7 #include "base/threading/platform_thread.h" |
8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
10 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" | 10 #include "content/browser/webrtc/webrtc_content_browsertest_base.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 // Automatically grant device permission. | 38 // Automatically grant device permission. |
39 AppendUseFakeUIForMediaStreamFlag(); | 39 AppendUseFakeUIForMediaStreamFlag(); |
40 } | 40 } |
41 | 41 |
42 protected: | 42 protected: |
43 // Convenience function since most peerconnection-call.html tests just load | 43 // Convenience function since most peerconnection-call.html tests just load |
44 // the page, kick off some javascript and wait for the title to change to OK. | 44 // the page, kick off some javascript and wait for the title to change to OK. |
45 void MakeTypicalPeerConnectionCall(const std::string& javascript) { | 45 void MakeTypicalPeerConnectionCall(const std::string& javascript) { |
46 MakeTypicalCall(javascript, "/media/peerconnection-call.html"); | 46 MakeTypicalCall(javascript, "/media/peerconnection-call.html"); |
47 } | 47 } |
| 48 |
| 49 void SetConfigurationTest(const std::string& javascript) { |
| 50 // This doesn't actually "make a call", it just loads the page, executes |
| 51 // the javascript and waits for "OK". |
| 52 MakeTypicalCall(javascript, "/media/peerconnection-setConfiguration.html"); |
| 53 } |
48 }; | 54 }; |
49 | 55 |
50 // These tests will make a complete PeerConnection-based call and verify that | 56 // These tests will make a complete PeerConnection-based call and verify that |
51 // video is playing for the call. | 57 // video is playing for the call. |
52 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, | 58 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, |
53 CanSetupDefaultVideoCall) { | 59 CanSetupDefaultVideoCall) { |
54 MakeTypicalPeerConnectionCall( | 60 MakeTypicalPeerConnectionCall( |
55 "callAndExpectResolution({video: true}, 640, 480);"); | 61 "callAndExpectResolution({video: true}, 640, 480);"); |
56 } | 62 } |
57 | 63 |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 201 } |
196 | 202 |
197 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { | 203 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { |
198 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); | 204 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); |
199 } | 205 } |
200 | 206 |
201 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallInsideIframe) { | 207 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallInsideIframe) { |
202 MakeTypicalPeerConnectionCall("callInsideIframe({video: true, audio:true});"); | 208 MakeTypicalPeerConnectionCall("callInsideIframe({video: true, audio:true});"); |
203 } | 209 } |
204 | 210 |
| 211 // Tests that SetConfiguration succeeds and triggers an ICE restart on the next |
| 212 // offer as described by JSEP. |
| 213 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, SetConfiguration) { |
| 214 SetConfigurationTest("testSetConfiguration();"); |
| 215 } |
| 216 |
| 217 // Tests the error conditions of SetConfiguration as described by webrtc-pc. |
| 218 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, SetConfigurationErrors) { |
| 219 SetConfigurationTest("testSetConfigurationErrors();"); |
| 220 } |
| 221 |
205 } // namespace content | 222 } // namespace content |
OLD | NEW |