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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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_CanSetupVideoCall DISABLED_CanSetupVideoCall |
68 #else | 68 #else |
69 #define MAYBE_CanSetupVideoCall CanSetupVideoCall | 69 #define MAYBE_CanSetupVideoCall CanSetupVideoCall |
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_CanSetupVideoCall) { |
75 MakeTypicalPeerConnectionCall("call({video: true});"); | 75 MakeTypicalPeerConnectionCall("call({video: true}, 640, 480);"); |
phoglund_chromium
2014/03/28 08:33:30
This is confusing - it looks like we're setting up
perkj_chrome
2014/03/28 09:14:23
Done.
| |
76 } | |
77 | |
78 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CanSetupVideoCallWith1To1AspecRatio) { | |
79 const std::string javascript = | |
80 "call({video: {mandatory: {minWidth: 320, maxWidth: 320, minHeight: 320, " | |
81 "maxHeight: 320}}}, 320, 320);"; | |
82 MakeTypicalPeerConnectionCall(javascript); | |
76 } | 83 } |
77 | 84 |
78 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 85 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
79 // Timing out on ARM linux, see http://crbug.com/240376 | 86 // Timing out on ARM linux, see http://crbug.com/240376 |
80 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall | 87 #define MAYBE_CanSetupAudioAndVideoCall DISABLED_CanSetupAudioAndVideoCall |
81 #else | 88 #else |
82 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall | 89 #define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall |
83 #endif | 90 #endif |
84 | 91 |
85 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { | 92 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { |
86 MakeTypicalPeerConnectionCall("call({video: true, audio: true});"); | 93 MakeTypicalPeerConnectionCall("call({video: true, audio: true}, 640, 480);"); |
87 } | 94 } |
88 | 95 |
89 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { | 96 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { |
90 MakeTypicalPeerConnectionCall("callAndSendDtmf(\'123,abc\');"); | 97 MakeTypicalPeerConnectionCall("callAndSendDtmf(\'123,abc\');"); |
91 } | 98 } |
92 | 99 |
93 // TODO(phoglund): this test fails because the peer connection state will be | 100 // TODO(phoglund): this test fails because the peer connection state will be |
94 // stable in the second negotiation round rather than have-local-offer. | 101 // stable in the second negotiation round rather than have-local-offer. |
95 // http://crbug.com/293125. | 102 // http://crbug.com/293125. |
96 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, | 103 IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 base::FilePath dump_file; | 355 base::FilePath dump_file; |
349 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); | 356 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); |
350 | 357 |
351 // This fakes the behavior of another open tab with webrtc-internals, and | 358 // This fakes the behavior of another open tab with webrtc-internals, and |
352 // enabling AEC dump in that tab. | 359 // enabling AEC dump in that tab. |
353 WebRTCInternals::GetInstance()->FileSelected(dump_file, -1, NULL); | 360 WebRTCInternals::GetInstance()->FileSelected(dump_file, -1, NULL); |
354 | 361 |
355 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 362 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
356 NavigateToURL(shell(), url); | 363 NavigateToURL(shell(), url); |
357 DisableOpusIfOnAndroid(); | 364 DisableOpusIfOnAndroid(); |
358 ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});"); | 365 ExecuteJavascriptAndWaitForOk("call({video: true, audio: true}, 640, 480);"); |
359 | 366 |
360 EXPECT_TRUE(base::PathExists(dump_file)); | 367 EXPECT_TRUE(base::PathExists(dump_file)); |
361 int64 file_size = 0; | 368 int64 file_size = 0; |
362 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 369 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
363 EXPECT_GT(file_size, 0); | 370 EXPECT_GT(file_size, 0); |
364 | 371 |
365 base::DeleteFile(dump_file, false); | 372 base::DeleteFile(dump_file, false); |
366 } | 373 } |
367 | 374 |
368 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) | 375 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
(...skipping 16 matching lines...) Expand all Loading... | |
385 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); | 392 ASSERT_TRUE(CreateTemporaryFile(&dump_file)); |
386 | 393 |
387 // This fakes the behavior of another open tab with webrtc-internals, and | 394 // This fakes the behavior of another open tab with webrtc-internals, and |
388 // enabling AEC dump in that tab, then disabling it. | 395 // enabling AEC dump in that tab, then disabling it. |
389 WebRTCInternals::GetInstance()->FileSelected(dump_file, -1, NULL); | 396 WebRTCInternals::GetInstance()->FileSelected(dump_file, -1, NULL); |
390 WebRTCInternals::GetInstance()->DisableAecDump(); | 397 WebRTCInternals::GetInstance()->DisableAecDump(); |
391 | 398 |
392 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); | 399 GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
393 NavigateToURL(shell(), url); | 400 NavigateToURL(shell(), url); |
394 DisableOpusIfOnAndroid(); | 401 DisableOpusIfOnAndroid(); |
395 ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});"); | 402 ExecuteJavascriptAndWaitForOk("call({video: true, audio: true}, 640, 480);"); |
396 | 403 |
397 EXPECT_TRUE(base::PathExists(dump_file)); | 404 EXPECT_TRUE(base::PathExists(dump_file)); |
398 int64 file_size = 0; | 405 int64 file_size = 0; |
399 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 406 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
400 EXPECT_EQ(0, file_size); | 407 EXPECT_EQ(0, file_size); |
401 | 408 |
402 base::DeleteFile(dump_file, false); | 409 base::DeleteFile(dump_file, false); |
403 } | 410 } |
404 | 411 |
405 } // namespace content | 412 } // namespace content |
OLD | NEW |