| OLD | NEW |
| 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/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
| 7 #include "base/values.h" | 7 #include "base/values.h" |
| 8 #include "content/browser/media/webrtc_internals.h" | 8 #include "content/browser/media/webrtc_internals.h" |
| 9 #include "content/browser/web_contents/web_contents_impl.h" | 9 #include "content/browser/web_contents/web_contents_impl.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 static const bool kRunTestsWithFlag[] = { false, true }; | 60 static const bool kRunTestsWithFlag[] = { false, true }; |
| 61 INSTANTIATE_TEST_CASE_P(WebRtcBrowserTests, | 61 INSTANTIATE_TEST_CASE_P(WebRtcBrowserTests, |
| 62 WebRtcBrowserTest, | 62 WebRtcBrowserTest, |
| 63 testing::ValuesIn(kRunTestsWithFlag)); | 63 testing::ValuesIn(kRunTestsWithFlag)); |
| 64 | 64 |
| 65 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 65 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
| 66 // Timing out on ARM linux bot: http://crbug.com/238490 | 66 // Timing out on ARM linux bot: http://crbug.com/238490 |
| 67 #define MAYBE_CanSetupVideoCall DISABLED_CanSetupVideoCall | 67 #define MAYBE_CanSetupDefaultVideoCall DISABLED_CanSetupDefaultVideoCall |
| 68 #else | 68 #else |
| 69 #define MAYBE_CanSetupVideoCall CanSetupVideoCall | 69 #define MAYBE_CanSetupDefaultVideoCall CanSetupDefaultVideoCall |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 // These tests will make a complete PeerConnection-based call and verify that | 72 // These tests will make a complete PeerConnection-based call and verify that |
| 73 // video is playing for the call. | 73 // video is playing for the call. |
| 74 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupVideoCall) { | 74 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupDefaultVideoCall) { |
| 75 MakeTypicalPeerConnectionCall("call({video: true});"); | 75 MakeTypicalPeerConnectionCall( |
| 76 "callAndExpectResolution({video: true}, 640, 480);"); |
| 77 } |
| 78 |
| 79 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CanSetupVideoCallWith1To1AspecRatio) { |
| 80 const std::string javascript = |
| 81 "callAndExpectResolution({video: {mandatory: {minWidth: 320," |
| 82 " maxWidth: 320, minHeight: 320, maxHeight: 320}}}, 320, 320);"; |
| 83 MakeTypicalPeerConnectionCall(javascript); |
| 76 } | 84 } |
| 77 | 85 |
| 78 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 86 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
| 79 // Timing out on ARM linux, see http://crbug.com/240376 | 87 // Timing out on ARM linux, see http://crbug.com/240376 |
| 80 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall | 88 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall |
| 81 #else | 89 #else |
| 82 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall | 90 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall |
| 83 #endif | 91 #endif |
| 84 | 92 |
| 85 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { | 93 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 | 404 |
| 397 EXPECT_TRUE(base::PathExists(dump_file)); | 405 EXPECT_TRUE(base::PathExists(dump_file)); |
| 398 int64 file_size = 0; | 406 int64 file_size = 0; |
| 399 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 407 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
| 400 EXPECT_EQ(0, file_size); | 408 EXPECT_EQ(0, file_size); |
| 401 | 409 |
| 402 base::DeleteFile(dump_file, false); | 410 base::DeleteFile(dump_file, false); |
| 403 } | 411 } |
| 404 | 412 |
| 405 } // namespace content | 413 } // namespace content |
| OLD | NEW |