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

Side by Side Diff: chrome/browser/media/webrtc/webrtc_browsertest_base.h

Issue 2545553003: WebRtcStatsPerfBrowserTest added, a perf test using the new getStats (Closed)
Patch Set: Addressed nits, rebase, default initialize Created 4 years 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
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest_base.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_WEBRTC_BROWSERTEST_BASE_H_ 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
6 #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_ 6 #define CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 25 matching lines...) Expand all
36 static const char kVideoCallConstraints720p[]; 36 static const char kVideoCallConstraints720p[];
37 static const char kVideoCallConstraints1080p[]; 37 static const char kVideoCallConstraints1080p[];
38 static const char kAudioVideoCallConstraints360p[]; 38 static const char kAudioVideoCallConstraints360p[];
39 static const char kAudioVideoCallConstraints720p[]; 39 static const char kAudioVideoCallConstraints720p[];
40 40
41 static const char kOkGotStream[]; 41 static const char kOkGotStream[];
42 static const char kFailedWithPermissionDeniedError[]; 42 static const char kFailedWithPermissionDeniedError[];
43 static const char kFailedWithPermissionDismissedError[]; 43 static const char kFailedWithPermissionDismissedError[];
44 44
45 static const char kUseDefaultCertKeygen[]; 45 static const char kUseDefaultCertKeygen[];
46 static const char kUseDefaultAudioCodec[];
46 static const char kUseDefaultVideoCodec[]; 47 static const char kUseDefaultVideoCodec[];
47 48
48 protected: 49 protected:
49 WebRtcTestBase(); 50 WebRtcTestBase();
50 ~WebRtcTestBase() override; 51 ~WebRtcTestBase() override;
51 52
52 // These all require that the loaded page fulfills the public interface in 53 // These all require that the loaded page fulfills the public interface in
53 // chrome/test/data/webrtc/getusermedia.js. 54 // chrome/test/data/webrtc/getusermedia.js.
54 // If an error is reported back from the getUserMedia call, these functions 55 // If an error is reported back from the getUserMedia call, these functions
55 // will return false. 56 // will return false.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 const std::string& keygen_algorithm) const; 168 const std::string& keygen_algorithm) const;
168 169
169 void VerifyStatsGeneratedCallback(content::WebContents* tab) const; 170 void VerifyStatsGeneratedCallback(content::WebContents* tab) const;
170 std::vector<std::string> VerifyStatsGeneratedPromise( 171 std::vector<std::string> VerifyStatsGeneratedPromise(
171 content::WebContents* tab) const; 172 content::WebContents* tab) const;
172 scoped_refptr<content::TestStatsReportDictionary> GetStatsReportDictionary( 173 scoped_refptr<content::TestStatsReportDictionary> GetStatsReportDictionary(
173 content::WebContents* tab) const; 174 content::WebContents* tab) const;
174 std::vector<std::string> GetWhitelistedStatsTypes( 175 std::vector<std::string> GetWhitelistedStatsTypes(
175 content::WebContents* tab) const; 176 content::WebContents* tab) const;
176 177
177 // Change the default video codec in the offer SDP. 178 // Change the default audio/video codec in the offer SDP.
179 void SetDefaultAudioCodec(content::WebContents* tab,
180 const std::string& audio_codec) const;
178 void SetDefaultVideoCodec(content::WebContents* tab, 181 void SetDefaultVideoCodec(content::WebContents* tab,
179 const std::string& video_codec) const; 182 const std::string& video_codec) const;
180 183
181 // Add 'usedtx=1' to the offer SDP. 184 // Add 'usedtx=1' to the offer SDP.
182 void EnableOpusDtx(content::WebContents* tab) const; 185 void EnableOpusDtx(content::WebContents* tab) const;
183 186
184 private: 187 private:
185 void CloseInfoBarInTab(content::WebContents* tab_contents, 188 void CloseInfoBarInTab(content::WebContents* tab_contents,
186 infobars::InfoBar* infobar) const; 189 infobars::InfoBar* infobar) const;
187 190
188 std::string CreateLocalOffer(content::WebContents* from_tab) const; 191 std::string CreateLocalOffer(content::WebContents* from_tab) const;
189 std::string CreateAnswer(std::string local_offer, 192 std::string CreateAnswer(std::string local_offer,
190 content::WebContents* to_tab) const; 193 content::WebContents* to_tab) const;
191 void ReceiveAnswer(const std::string& answer, 194 void ReceiveAnswer(const std::string& answer,
192 content::WebContents* from_tab) const; 195 content::WebContents* from_tab) const;
193 void GatherAndSendIceCandidates(content::WebContents* from_tab, 196 void GatherAndSendIceCandidates(content::WebContents* from_tab,
194 content::WebContents* to_tab) const; 197 content::WebContents* to_tab) const;
195 198
196 infobars::InfoBar* GetUserMediaAndWaitForInfoBar( 199 infobars::InfoBar* GetUserMediaAndWaitForInfoBar(
197 content::WebContents* tab_contents, 200 content::WebContents* tab_contents,
198 const std::string& constraints) const; 201 const std::string& constraints) const;
199 202
200 bool detect_errors_in_javascript_; 203 bool detect_errors_in_javascript_;
201 204
202 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase); 205 DISALLOW_COPY_AND_ASSIGN(WebRtcTestBase);
203 }; 206 };
204 207
205 #endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_ 208 #endif // CHROME_BROWSER_MEDIA_WEBRTC_WEBRTC_BROWSERTEST_BASE_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698