| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/test/webrtc_content_browsertest_base.h" | 5 #include "content/test/webrtc_content_browsertest_base.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "content/public/common/content_switches.h" | 10 #include "content/public/common/content_switches.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( | 27 ASSERT_TRUE(CommandLine::ForCurrentProcess()->HasSwitch( |
| 28 switches::kUseFakeUIForMediaStream)); | 28 switches::kUseFakeUIForMediaStream)); |
| 29 | 29 |
| 30 // Always include loopback interface in network list, in case the test device | 30 // Always include loopback interface in network list, in case the test device |
| 31 // doesn't have other interfaces available. | 31 // doesn't have other interfaces available. |
| 32 CommandLine::ForCurrentProcess()->AppendSwitch( | 32 CommandLine::ForCurrentProcess()->AppendSwitch( |
| 33 switches::kAllowLoopbackInPeerConnection); | 33 switches::kAllowLoopbackInPeerConnection); |
| 34 } | 34 } |
| 35 | 35 |
| 36 void WebRtcContentBrowserTest::SetUp() { | 36 void WebRtcContentBrowserTest::SetUp() { |
| 37 // This is needed lest we break on some virtual machines and weird bot |
| 38 // configs, like ChromeOS and Win x64 swarming. |
| 37 EnablePixelOutput(); | 39 EnablePixelOutput(); |
| 38 #if defined(OS_CHROMEOS) | 40 #if defined(OS_CHROMEOS) |
| 39 chromeos::CrasAudioHandler::InitializeForTesting(); | 41 chromeos::CrasAudioHandler::InitializeForTesting(); |
| 40 #endif | 42 #endif |
| 41 ContentBrowserTest::SetUp(); | 43 ContentBrowserTest::SetUp(); |
| 42 } | 44 } |
| 43 | 45 |
| 44 void WebRtcContentBrowserTest::TearDown() { | 46 void WebRtcContentBrowserTest::TearDown() { |
| 45 ContentBrowserTest::TearDown(); | 47 ContentBrowserTest::TearDown(); |
| 46 #if defined(OS_CHROMEOS) | 48 #if defined(OS_CHROMEOS) |
| 47 chromeos::CrasAudioHandler::Shutdown(); | 49 chromeos::CrasAudioHandler::Shutdown(); |
| 48 #endif | 50 #endif |
| 49 } | 51 } |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 | 93 |
| 92 void WebRtcContentBrowserTest::DisableOpusIfOnAndroid() { | 94 void WebRtcContentBrowserTest::DisableOpusIfOnAndroid() { |
| 93 #if defined(OS_ANDROID) | 95 #if defined(OS_ANDROID) |
| 94 // Always force iSAC 16K on Android for now (Opus is broken). | 96 // Always force iSAC 16K on Android for now (Opus is broken). |
| 95 EXPECT_EQ("isac-forced", | 97 EXPECT_EQ("isac-forced", |
| 96 ExecuteJavascriptAndReturnResult("forceIsac16KInSdp();")); | 98 ExecuteJavascriptAndReturnResult("forceIsac16KInSdp();")); |
| 97 #endif | 99 #endif |
| 98 } | 100 } |
| 99 | 101 |
| 100 } // namespace content | 102 } // namespace content |
| OLD | NEW |