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

Side by Side Diff: content/browser/media/webrtc_browsertest.cc

Issue 246433006: Change MediaStreamVideoSource to output different resolutions to different tracks depending on the … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/file_util.h" 6 #include "base/file_util.h"
7 #include "base/strings/stringprintf.h" 7 #include "base/strings/stringprintf.h"
8 #include "base/values.h" 8 #include "base/values.h"
9 #include "content/browser/media/webrtc_internals.h" 9 #include "content/browser/media/webrtc_internals.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 "callAndExpectResolution({video: true}, 640, 480);"); 85 "callAndExpectResolution({video: true}, 640, 480);");
86 } 86 }
87 87
88 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CanSetupVideoCallWith1To1AspecRatio) { 88 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CanSetupVideoCallWith1To1AspecRatio) {
89 const std::string javascript = 89 const std::string javascript =
90 "callAndExpectResolution({video: {mandatory: {minWidth: 320," 90 "callAndExpectResolution({video: {mandatory: {minWidth: 320,"
91 " maxWidth: 320, minHeight: 320, maxHeight: 320}}}, 320, 320);"; 91 " maxWidth: 320, minHeight: 320, maxHeight: 320}}}, 320, 320);";
92 MakeTypicalPeerConnectionCall(javascript); 92 MakeTypicalPeerConnectionCall(javascript);
93 } 93 }
94 94
95 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
96 CanSetupVideoCallWith16To9AspecRatio) {
97 const std::string javascript =
98 "callAndExpectResolution({video: {mandatory: {minWidth: 640,"
99 " maxWidth: 640, minAspectRatio: 1.7777}}}, 640, 360);";
100 MakeTypicalPeerConnectionCall(javascript);
101 }
102
103 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
104 CanSetupVideoCallWith4To3AspecRatio) {
105 const std::string javascript =
106 "callAndExpectResolution({video: {mandatory: {minWidth: 960,"
107 "maxAspectRatio: 1.333}}}, 960, 720);";
108 MakeTypicalPeerConnectionCall(javascript);
109 }
110
95 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) 111 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY)
96 // Timing out on ARM linux, see http://crbug.com/240376 112 // Timing out on ARM linux, see http://crbug.com/240376
97 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall 113 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall
98 #else 114 #else
99 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall 115 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall
100 #endif 116 #endif
101 117
102 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { 118 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) {
103 MakeTypicalPeerConnectionCall("call({video: true, audio: true});"); 119 MakeTypicalPeerConnectionCall("call({video: true, audio: true});");
104 } 120 }
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 442
427 EXPECT_TRUE(base::PathExists(dump_file)); 443 EXPECT_TRUE(base::PathExists(dump_file));
428 int64 file_size = 0; 444 int64 file_size = 0;
429 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); 445 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size));
430 EXPECT_EQ(0, file_size); 446 EXPECT_EQ(0, file_size);
431 447
432 base::DeleteFile(dump_file, false); 448 base::DeleteFile(dump_file, false);
433 } 449 }
434 450
435 } // namespace content 451 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698