Index: content/test/webrtc_content_browsertest_base.cc |
diff --git a/content/test/webrtc_content_browsertest_base.cc b/content/test/webrtc_content_browsertest_base.cc |
index b2885dbc8d5490bbf18fb6f263a440e2871be7a0..db83501971f94d6d57e18bd42ceb669a5308e2e9 100644 |
--- a/content/test/webrtc_content_browsertest_base.cc |
+++ b/content/test/webrtc_content_browsertest_base.cc |
@@ -13,6 +13,10 @@ |
#include "content/shell/browser/shell.h" |
#include "media/base/media_switches.h" |
+#if defined(OS_CHROMEOS) |
+#include "chromeos/audio/cras_audio_handler.h" |
+#endif |
+ |
namespace content { |
void WebRtcContentBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
@@ -31,9 +35,19 @@ void WebRtcContentBrowserTest::SetUpCommandLine(CommandLine* command_line) { |
void WebRtcContentBrowserTest::SetUp() { |
EnablePixelOutput(); |
+#if defined(OS_CHROMEOS) |
+ chromeos::CrasAudioHandler::InitializeForTesting(); |
+#endif |
ContentBrowserTest::SetUp(); |
} |
+void WebRtcContentBrowserTest::TearDown() { |
+ ContentBrowserTest::TearDown(); |
+#if defined(OS_CHROMEOS) |
+ chromeos::CrasAudioHandler::Shutdown(); |
+#endif |
+} |
+ |
// Executes |javascript|. The script is required to use |
// window.domAutomationController.send to send a string value back to here. |
std::string WebRtcContentBrowserTest::ExecuteJavascriptAndReturnResult( |