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

Side by Side Diff: chrome/browser/media/webrtc/webrtc_browsertest.cc

Issue 2363673002: Promise-based RTCPeerConnection::getStats implementation. (Closed)
Patch Set: RTCStatsReport.idl behind getStats-flag instead of updating virtual/stable/webexposed/global-interf… Created 4 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest_base.h » ('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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/strings/stringprintf.h" 6 #include "base/strings/stringprintf.h"
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" 8 #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
9 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h" 9 #include "chrome/browser/media/webrtc/webrtc_browsertest_common.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 42
43 void SetUpCommandLine(base::CommandLine* command_line) override { 43 void SetUpCommandLine(base::CommandLine* command_line) override {
44 // Ensure the infobar is enabled, since we expect that in this test. 44 // Ensure the infobar is enabled, since we expect that in this test.
45 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream)); 45 EXPECT_FALSE(command_line->HasSwitch(switches::kUseFakeUIForMediaStream));
46 46
47 // Always use fake devices. 47 // Always use fake devices.
48 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); 48 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
49 49
50 // Flag used by TestWebAudioMediaStream to force garbage collection. 50 // Flag used by TestWebAudioMediaStream to force garbage collection.
51 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc"); 51 command_line->AppendSwitchASCII(switches::kJavaScriptFlags, "--expose-gc");
52
53 // Flag used by |RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise|.
54 // TODO(hbos): Remove this when bug crbug.com/627816 is resolved (when this
55 // flag is removed).
56 command_line->AppendSwitchASCII(switches::kEnableBlinkFeatures,
57 "RTCPeerConnectionNewGetStats");
52 } 58 }
53 59
54 void RunsAudioVideoWebRTCCallInTwoTabs( 60 void RunsAudioVideoWebRTCCallInTwoTabs(
55 const std::string& video_codec = WebRtcTestBase::kUseDefaultVideoCodec, 61 const std::string& video_codec = WebRtcTestBase::kUseDefaultVideoCodec,
56 const std::string& offer_cert_keygen_alg = 62 const std::string& offer_cert_keygen_alg =
57 WebRtcTestBase::kUseDefaultCertKeygen, 63 WebRtcTestBase::kUseDefaultCertKeygen,
58 const std::string& answer_cert_keygen_alg = 64 const std::string& answer_cert_keygen_alg =
59 WebRtcTestBase::kUseDefaultCertKeygen) { 65 WebRtcTestBase::kUseDefaultCertKeygen) {
60 StartServerAndOpenTabs(); 66 StartServerAndOpenTabs();
61 67
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 } 197 }
192 198
193 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, 199 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
194 RunsAudioVideoWebRTCCallInTwoTabsOfferEcdsaAnswerRsa) { 200 RunsAudioVideoWebRTCCallInTwoTabsOfferEcdsaAnswerRsa) {
195 RunsAudioVideoWebRTCCallInTwoTabs(WebRtcTestBase::kUseDefaultVideoCodec, 201 RunsAudioVideoWebRTCCallInTwoTabs(WebRtcTestBase::kUseDefaultVideoCodec,
196 kKeygenAlgorithmEcdsa, 202 kKeygenAlgorithmEcdsa,
197 kKeygenAlgorithmRsa); 203 kKeygenAlgorithmRsa);
198 } 204 }
199 205
200 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, 206 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
201 RunsAudioVideoWebRTCCallInTwoTabsGetStats) { 207 RunsAudioVideoWebRTCCallInTwoTabsGetStatsCallback) {
202 StartServerAndOpenTabs(); 208 StartServerAndOpenTabs();
203 SetupPeerconnectionWithLocalStream(left_tab_); 209 SetupPeerconnectionWithLocalStream(left_tab_);
204 SetupPeerconnectionWithLocalStream(right_tab_); 210 SetupPeerconnectionWithLocalStream(right_tab_);
205 NegotiateCall(left_tab_, right_tab_); 211 NegotiateCall(left_tab_, right_tab_);
206 212
207 VerifyStatsGenerated(left_tab_); 213 VerifyStatsGeneratedCallback(left_tab_);
208 214
209 DetectVideoAndHangUp(); 215 DetectVideoAndHangUp();
210 } 216 }
217
218 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
219 RunsAudioVideoWebRTCCallInTwoTabsGetStatsPromise) {
220 StartServerAndOpenTabs();
221 SetupPeerconnectionWithLocalStream(left_tab_);
222 SetupPeerconnectionWithLocalStream(right_tab_);
223 NegotiateCall(left_tab_, right_tab_);
224
225 VerifyStatsGeneratedPromise(left_tab_);
226
227 DetectVideoAndHangUp();
228 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698