OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ |
6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
122 content::WebContents* tab, | 122 content::WebContents* tab, |
123 const std::string& certificate) const; | 123 const std::string& certificate) const; |
124 | 124 |
125 // Exchanges offers and answers between the peer connections in the | 125 // Exchanges offers and answers between the peer connections in the |
126 // respective tabs. Before calling this, you must have prepared peer | 126 // respective tabs. Before calling this, you must have prepared peer |
127 // connections in both tabs and configured them as you like (for instance by | 127 // connections in both tabs and configured them as you like (for instance by |
128 // calling SetupPeerconnectionWithLocalStream). | 128 // calling SetupPeerconnectionWithLocalStream). |
129 // If |video_codec| is not |kUseDefaultVideoCodec|, the SDP offer is modified | 129 // If |video_codec| is not |kUseDefaultVideoCodec|, the SDP offer is modified |
130 // (and SDP answer verified) so that the specified video codec (case-sensitive | 130 // (and SDP answer verified) so that the specified video codec (case-sensitive |
131 // name) is used during the call instead of the default one. | 131 // name) is used during the call instead of the default one. |
132 void NegotiateCall( | 132 void NegotiateCall(content::WebContents* from_tab, |
133 content::WebContents* from_tab, | 133 content::WebContents* to_tab) const; |
134 content::WebContents* to_tab, | |
135 const std::string& video_codec = kUseDefaultVideoCodec) const; | |
136 | 134 |
137 // Hangs up a negotiated call. | 135 // Hangs up a negotiated call. |
138 void HangUp(content::WebContents* from_tab) const; | 136 void HangUp(content::WebContents* from_tab) const; |
139 | 137 |
140 // Call this to enable monitoring of javascript errors for this test method. | 138 // Call this to enable monitoring of javascript errors for this test method. |
141 // This will only work if the tests are run sequentially by the test runner | 139 // This will only work if the tests are run sequentially by the test runner |
142 // (i.e. with --test-launcher-developer-mode or --test-launcher-jobs=1). | 140 // (i.e. with --test-launcher-developer-mode or --test-launcher-jobs=1). |
143 void DetectErrorsInJavaScript(); | 141 void DetectErrorsInJavaScript(); |
144 | 142 |
145 // Methods for detecting if video is playing (the loaded page must have | 143 // Methods for detecting if video is playing (the loaded page must have |
(...skipping 13 matching lines...) Expand all Loading... | |
159 // Returns true if we're on win 8. | 157 // Returns true if we're on win 8. |
160 bool OnWin8() const; | 158 bool OnWin8() const; |
161 | 159 |
162 void OpenDatabase(content::WebContents* tab) const; | 160 void OpenDatabase(content::WebContents* tab) const; |
163 void CloseDatabase(content::WebContents* tab) const; | 161 void CloseDatabase(content::WebContents* tab) const; |
164 void DeleteDatabase(content::WebContents* tab) const; | 162 void DeleteDatabase(content::WebContents* tab) const; |
165 | 163 |
166 void GenerateAndCloneCertificate(content::WebContents* tab, | 164 void GenerateAndCloneCertificate(content::WebContents* tab, |
167 const std::string& keygen_algorithm) const; | 165 const std::string& keygen_algorithm) const; |
168 | 166 |
167 // Change the default video codec in the offer SDP. | |
168 void SetDefaultVideoCodec(content::WebContents* tab, | |
169 const std::string& video_codec) const; | |
170 // Add 'usedtx=1' to the offer SDP. | |
phoglund_chromium
2016/07/28 06:39:01
Nit: blank line before #170
Ivo-OOO until feb 6
2016/07/28 12:29:31
Done.
| |
171 void EnableOpusDtx(content::WebContents* tab) const; | |
172 | |
169 private: | 173 private: |
170 void CloseInfoBarInTab(content::WebContents* tab_contents, | 174 void CloseInfoBarInTab(content::WebContents* tab_contents, |
171 infobars::InfoBar* infobar) const; | 175 infobars::InfoBar* infobar) const; |
172 | 176 |
173 std::string CreateLocalOffer( | 177 std::string CreateLocalOffer(content::WebContents* from_tab) const; |
174 content::WebContents* from_tab, | 178 std::string CreateAnswer(std::string local_offer, |
175 std::string default_video_codec = kUseDefaultVideoCodec) const; | 179 content::WebContents* to_tab) const; |
176 std::string CreateAnswer( | |
177 std::string local_offer, | |
178 content::WebContents* to_tab, | |
179 std::string default_video_codec = kUseDefaultVideoCodec) const; | |
180 void ReceiveAnswer(const std::string& answer, | 180 void ReceiveAnswer(const std::string& answer, |
181 content::WebContents* from_tab) const; | 181 content::WebContents* from_tab) const; |
182 void GatherAndSendIceCandidates(content::WebContents* from_tab, | 182 void GatherAndSendIceCandidates(content::WebContents* from_tab, |
183 content::WebContents* to_tab) const; | 183 content::WebContents* to_tab) const; |
184 | 184 |
185 infobars::InfoBar* GetUserMediaAndWaitForInfoBar( | 185 infobars::InfoBar* GetUserMediaAndWaitForInfoBar( |
186 content::WebContents* tab_contents, | 186 content::WebContents* tab_contents, |
187 const std::string& constraints) const; | 187 const std::string& constraints) const; |
188 | 188 |
189 bool detect_errors_in_javascript_; | 189 bool detect_errors_in_javascript_; |
190 | 190 |
191 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase); | 191 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase); |
192 }; | 192 }; |
193 | 193 |
194 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ | 194 #endif // CHROME_BROWSER_MEDIA_WEBRTC_BROWSERTEST_BASE_H_ |
OLD | NEW |