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

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

Issue 2985263002: Reland of RTCVideoEncoder: Report H264 profile information to WebRTC (Closed)
Patch Set: Fix tests Created 3 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
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 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 ASSERT_TRUE(embedded_test_server()->Start()); 156 ASSERT_TRUE(embedded_test_server()->Start());
157 157
158 content::WebContents* left_tab = 158 content::WebContents* left_tab =
159 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 159 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
160 content::WebContents* right_tab = 160 content::WebContents* right_tab =
161 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 161 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
162 162
163 SetupPeerconnectionWithLocalStream(left_tab); 163 SetupPeerconnectionWithLocalStream(left_tab);
164 SetupPeerconnectionWithLocalStream(right_tab); 164 SetupPeerconnectionWithLocalStream(right_tab);
165 165
166 SetDefaultVideoCodec(left_tab, "VP8"); 166 SetDefaultVideoCodec(left_tab, "VP8", false /* prefer_hw_video_codec */);
167 SetDefaultVideoCodec(right_tab, "VP8"); 167 SetDefaultVideoCodec(right_tab, "VP8", false /* prefer_hw_video_codec */);
168 NegotiateCall(left_tab, right_tab); 168 NegotiateCall(left_tab, right_tab);
169 169
170 StartDetectingVideo(left_tab, "remote-view"); 170 StartDetectingVideo(left_tab, "remote-view");
171 StartDetectingVideo(right_tab, "remote-view"); 171 StartDetectingVideo(right_tab, "remote-view");
172 172
173 // Start the event log. 173 // Start the event log.
174 const int seconds = 0; 174 const int seconds = 0;
175 base::ListValue start_params; 175 base::ListValue start_params;
176 AppendTabIdAndUrl(&start_params, left_tab); 176 AppendTabIdAndUrl(&start_params, left_tab);
177 start_params.AppendInteger(seconds); 177 start_params.AppendInteger(seconds);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 ASSERT_TRUE(embedded_test_server()->Start()); 250 ASSERT_TRUE(embedded_test_server()->Start());
251 251
252 content::WebContents* left_tab = 252 content::WebContents* left_tab =
253 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 253 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
254 content::WebContents* right_tab = 254 content::WebContents* right_tab =
255 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage); 255 OpenTestPageAndGetUserMediaInNewTab(kMainWebrtcTestHtmlPage);
256 256
257 SetupPeerconnectionWithLocalStream(left_tab); 257 SetupPeerconnectionWithLocalStream(left_tab);
258 SetupPeerconnectionWithLocalStream(right_tab); 258 SetupPeerconnectionWithLocalStream(right_tab);
259 259
260 SetDefaultVideoCodec(left_tab, "VP8"); 260 SetDefaultVideoCodec(left_tab, "VP8", false /* prefer_hw_video_codec */);
261 SetDefaultVideoCodec(right_tab, "VP8"); 261 SetDefaultVideoCodec(right_tab, "VP8", false /* prefer_hw_video_codec */);
262 NegotiateCall(left_tab, right_tab); 262 NegotiateCall(left_tab, right_tab);
263 263
264 StartDetectingVideo(left_tab, "remote-view"); 264 StartDetectingVideo(left_tab, "remote-view");
265 StartDetectingVideo(right_tab, "remote-view"); 265 StartDetectingVideo(right_tab, "remote-view");
266 266
267 // Start the event log. RunFunctionAndReturnSingleResult will block until a 267 // Start the event log. RunFunctionAndReturnSingleResult will block until a
268 // result is available, which happens when the logging stops after 1 second. 268 // result is available, which happens when the logging stops after 1 second.
269 const int seconds = 1; 269 const int seconds = 1;
270 base::ListValue start_params; 270 base::ListValue start_params;
271 AppendTabIdAndUrl(&start_params, left_tab); 271 AppendTabIdAndUrl(&start_params, left_tab);
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 ASSERT_TRUE(waiter->Start()) << "ERROR watching for " 311 ASSERT_TRUE(waiter->Start()) << "ERROR watching for "
312 << full_file_name.value(); 312 << full_file_name.value();
313 ASSERT_TRUE(waiter->WaitForFile()); 313 ASSERT_TRUE(waiter->WaitForFile());
314 ASSERT_TRUE(base::PathExists(full_file_name)); 314 ASSERT_TRUE(base::PathExists(full_file_name));
315 EXPECT_TRUE(base::GetFileSize(full_file_name, &file_size)); 315 EXPECT_TRUE(base::GetFileSize(full_file_name, &file_size));
316 EXPECT_GT(file_size, 0); 316 EXPECT_GT(file_size, 0);
317 317
318 // Clean up. 318 // Clean up.
319 base::DeleteFile(full_file_name, false); 319 base::DeleteFile(full_file_name, false);
320 } 320 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/media/webrtc/webrtc_browsertest.cc » ('j') | chrome/test/data/webrtc/munge_sdp.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698