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

Side by Side Diff: chrome/browser/extensions/api/webrtc_logging_private/webrtc_event_log_apitest.cc

Issue 2190533002: Adds a WebRTC browser_test with opus dtx enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Last comments by Minyue. Created 4 years, 4 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_browsertest.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 <memory> 5 #include <memory>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path_watcher.h" 9 #include "base/files/file_path_watcher.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 ASSERT_TRUE(embedded_test_server()->Start()); 154 ASSERT_TRUE(embedded_test_server()->Start());
155 155
156 content::WebContents* left_tab = 156 content::WebContents* left_tab =
157 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 157 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
158 content::WebContents* right_tab = 158 content::WebContents* right_tab =
159 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 159 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
160 160
161 SetupPeerconnectionWithLocalStream(left_tab); 161 SetupPeerconnectionWithLocalStream(left_tab);
162 SetupPeerconnectionWithLocalStream(right_tab); 162 SetupPeerconnectionWithLocalStream(right_tab);
163 163
164 NegotiateCall(left_tab, right_tab, "VP8"); 164 SetDefaultVideoCodec(left_tab, "VP8");
165 SetDefaultVideoCodec(right_tab, "VP8");
166 NegotiateCall(left_tab, right_tab);
165 167
166 StartDetectingVideo(left_tab, "remote-view"); 168 StartDetectingVideo(left_tab, "remote-view");
167 StartDetectingVideo(right_tab, "remote-view"); 169 StartDetectingVideo(right_tab, "remote-view");
168 170
169 // Start the event log. 171 // Start the event log.
170 const int seconds = 0; 172 const int seconds = 0;
171 base::ListValue start_params; 173 base::ListValue start_params;
172 AppendTabIdAndUrl(&start_params, left_tab); 174 AppendTabIdAndUrl(&start_params, left_tab);
173 start_params.AppendInteger(seconds); 175 start_params.AppendInteger(seconds);
174 scoped_refptr<WebrtcLoggingPrivateStartWebRtcEventLoggingFunction> 176 scoped_refptr<WebrtcLoggingPrivateStartWebRtcEventLoggingFunction>
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 ASSERT_TRUE(embedded_test_server()->Start()); 246 ASSERT_TRUE(embedded_test_server()->Start());
245 247
246 content::WebContents* left_tab = 248 content::WebContents* left_tab =
247 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 249 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
248 content::WebContents* right_tab = 250 content::WebContents* right_tab =
249 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 251 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
250 252
251 SetupPeerconnectionWithLocalStream(left_tab); 253 SetupPeerconnectionWithLocalStream(left_tab);
252 SetupPeerconnectionWithLocalStream(right_tab); 254 SetupPeerconnectionWithLocalStream(right_tab);
253 255
254 NegotiateCall(left_tab, right_tab, "VP8"); 256 SetDefaultVideoCodec(left_tab, "VP8");
257 SetDefaultVideoCodec(right_tab, "VP8");
258 NegotiateCall(left_tab, right_tab);
255 259
256 StartDetectingVideo(left_tab, "remote-view"); 260 StartDetectingVideo(left_tab, "remote-view");
257 StartDetectingVideo(right_tab, "remote-view"); 261 StartDetectingVideo(right_tab, "remote-view");
258 262
259 // Start the event log. RunFunctionAndReturnSingleResult will block until a 263 // Start the event log. RunFunctionAndReturnSingleResult will block until a
260 // result is available, which happens when the logging stops after 1 second. 264 // result is available, which happens when the logging stops after 1 second.
261 const int seconds = 1; 265 const int seconds = 1;
262 base::ListValue start_params; 266 base::ListValue start_params;
263 AppendTabIdAndUrl(&start_params, left_tab); 267 AppendTabIdAndUrl(&start_params, left_tab);
264 start_params.AppendInteger(seconds); 268 start_params.AppendInteger(seconds);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 ASSERT_TRUE(waiter->Start()) << "ERROR watching for " 307 ASSERT_TRUE(waiter->Start()) << "ERROR watching for "
304 << full_file_name.value(); 308 << full_file_name.value();
305 ASSERT_TRUE(waiter->WaitForFile()); 309 ASSERT_TRUE(waiter->WaitForFile());
306 ASSERT_TRUE(base::PathExists(full_file_name)); 310 ASSERT_TRUE(base::PathExists(full_file_name));
307 EXPECT_TRUE(base::GetFileSize(full_file_name, &file_size)); 311 EXPECT_TRUE(base::GetFileSize(full_file_name, &file_size));
308 EXPECT_GT(file_size, 0); 312 EXPECT_GT(file_size, 0);
309 313
310 // Clean up. 314 // Clean up.
311 base::DeleteFile(full_file_name, false); 315 base::DeleteFile(full_file_name, false);
312 } 316 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/webrtc_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698