| 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/file_util.h" | 6 #include "base/file_util.h" |
| 7 #include "base/process/process_handle.h" | 7 #include "base/process/process_handle.h" |
| 8 #include "base/strings/string_number_conversions.h" | 8 #include "base/strings/string_number_conversions.h" |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/threading/platform_thread.h" | 10 #include "base/threading/platform_thread.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 void MakeAudioDetectingPeerConnectionCall(const std::string& javascript) { | 77 void MakeAudioDetectingPeerConnectionCall(const std::string& javascript) { |
| 78 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { | 78 if (!media::AudioManager::Get()->HasAudioOutputDevices()) { |
| 79 // Bots with no output devices will force the audio code into a state | 79 // Bots with no output devices will force the audio code into a state |
| 80 // where it doesn't manage to set either the low or high latency path. | 80 // where it doesn't manage to set either the low or high latency path. |
| 81 // This test will compute useless values in that case, so skip running on | 81 // This test will compute useless values in that case, so skip running on |
| 82 // such bots (see crbug.com/326338). | 82 // such bots (see crbug.com/326338). |
| 83 LOG(INFO) << "Missing output devices: skipping test..."; | 83 LOG(INFO) << "Missing output devices: skipping test..."; |
| 84 return; | 84 return; |
| 85 } | 85 } |
| 86 | 86 |
| 87 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 87 ASSERT_TRUE(base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 88 switches::kUseFakeDeviceForMediaStream)) | 88 switches::kUseFakeDeviceForMediaStream)) |
| 89 << "Must run with fake devices since the test will explicitly look " | 89 << "Must run with fake devices since the test will explicitly look " |
| 90 << "for the fake device signal."; | 90 << "for the fake device signal."; |
| 91 | 91 |
| 92 MakeTypicalPeerConnectionCall(javascript); | 92 MakeTypicalPeerConnectionCall(javascript); |
| 93 } | 93 } |
| 94 | 94 |
| 95 void DisableOpusIfOnAndroid() { | 95 void DisableOpusIfOnAndroid() { |
| 96 #if defined(OS_ANDROID) | 96 #if defined(OS_ANDROID) |
| 97 // Always force iSAC 16K on Android for now (Opus is broken). | 97 // Always force iSAC 16K on Android for now (Opus is broken). |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p | 188 #define MAYBE_CanForwardRemoteStream720p DISABLED_CanForwardRemoteStream720p |
| 189 #else | 189 #else |
| 190 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p | 190 #define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p |
| 191 #endif | 191 #endif |
| 192 #endif | 192 #endif |
| 193 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { | 193 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { |
| 194 #if defined (OS_ANDROID) | 194 #if defined (OS_ANDROID) |
| 195 // This test fails on Nexus 5 devices. | 195 // This test fails on Nexus 5 devices. |
| 196 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | 196 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 |
| 197 // for details. | 197 // for details. |
| 198 CommandLine::ForCurrentProcess()->AppendSwitch( | 198 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 199 switches::kDisableWebRtcHWDecoding); | 199 switches::kDisableWebRtcHWDecoding); |
| 200 #endif | 200 #endif |
| 201 MakeTypicalPeerConnectionCall( | 201 MakeTypicalPeerConnectionCall( |
| 202 "callAndForwardRemoteStream({video: true, audio: false});"); | 202 "callAndForwardRemoteStream({video: true, audio: false});"); |
| 203 } | 203 } |
| 204 | 204 |
| 205 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { | 205 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { |
| 206 #if defined (OS_ANDROID) | 206 #if defined (OS_ANDROID) |
| 207 // This test fails on Nexus 5 devices. | 207 // This test fails on Nexus 5 devices. |
| 208 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 | 208 // TODO(henrika): see http://crbug.com/362437 and http://crbug.com/359389 |
| 209 // for details. | 209 // for details. |
| 210 CommandLine::ForCurrentProcess()->AppendSwitch( | 210 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
| 211 switches::kDisableWebRtcHWDecoding); | 211 switches::kDisableWebRtcHWDecoding); |
| 212 #endif | 212 #endif |
| 213 const std::string javascript = GenerateGetUserMediaCall( | 213 const std::string javascript = GenerateGetUserMediaCall( |
| 214 "callAndForwardRemoteStream", 1280, 1280, 720, 720, 10, 30); | 214 "callAndForwardRemoteStream", 1280, 1280, 720, 720, 10, 30); |
| 215 MakeTypicalPeerConnectionCall(javascript); | 215 MakeTypicalPeerConnectionCall(javascript); |
| 216 } | 216 } |
| 217 | 217 |
| 218 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, | 218 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
| 219 NoCrashWhenConnectChromiumSinkToRemoteTrack) { | 219 NoCrashWhenConnectChromiumSinkToRemoteTrack) { |
| 220 MakeTypicalPeerConnectionCall("ConnectChromiumSinkToRemoteAudioTrack();"); | 220 MakeTypicalPeerConnectionCall("ConnectChromiumSinkToRemoteAudioTrack();"); |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 | 545 |
| 546 base::DeleteFile(unique_dump_file, false); | 546 base::DeleteFile(unique_dump_file, false); |
| 547 } | 547 } |
| 548 } | 548 } |
| 549 | 549 |
| 550 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CreateOfferWithOfferOptions) { | 550 IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CreateOfferWithOfferOptions) { |
| 551 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); | 551 MakeTypicalPeerConnectionCall("testCreateOfferOptions();"); |
| 552 } | 552 } |
| 553 | 553 |
| 554 } // namespace content | 554 } // namespace content |
| OLD | NEW |