Commit 46500c65 authored by Ken MacKay's avatar Ken MacKay Committed by Commit Bot

[Chromecast] Use separate endpoint for audio backend unittests

Bug: internal b/151990838
Change-Id: I3b852cb23f5320f69c75a9ffbdd8cdc58fecff2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2134195
Commit-Queue: Kenneth MacKay <kmackay@chromium.org>
Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#756324}
parent 7e95c20c
...@@ -128,7 +128,11 @@ cast_test_group("cast_tests") { ...@@ -128,7 +128,11 @@ cast_test_group("cast_tests") {
test_name = "cast_audio_backend_unittests" test_name = "cast_audio_backend_unittests"
# --test-launcher-jobs=1 => so mixer service receiver can bind. # --test-launcher-jobs=1 => so mixer service receiver can bind.
args = [ "--test-launcher-jobs=1" ] args = [
"--test-launcher-jobs=1",
"--mixer-service-endpoint=/tmp/cast_audio_backend_unittest-mixer",
"--mixer-service-port=12855",
]
} }
filters += [ cast_audio_backend_unittests_filter ] filters += [ cast_audio_backend_unittests_filter ]
} }
......
...@@ -185,11 +185,14 @@ const char kBackGestureHorizontalThreshold[] = ...@@ -185,11 +185,14 @@ const char kBackGestureHorizontalThreshold[] =
// Whether to enable detection and dispatch of a 'drag from the top' gesture. // Whether to enable detection and dispatch of a 'drag from the top' gesture.
const char kEnableTopDragGesture[] = "enable-top-drag-gesture"; const char kEnableTopDragGesture[] = "enable-top-drag-gesture";
// Endpoint that the mixer service listens on. On Linux/Android, this is a // Endpoint that the mixer service listens on. This is a path for a UNIX domain
// path for a UNIX domain socket (default is /tmp/mixer-service). On other // socket (default is /tmp/mixer-service).
// platforms, this is a TCP port to listen on (on localhost) (default 12854).
const char kMixerServiceEndpoint[] = "mixer-service-endpoint"; const char kMixerServiceEndpoint[] = "mixer-service-endpoint";
// TCP port that the mixer service listens on on non-Linux platforms.
// (default 12854).
const char kMixerServicePort[] = "mixer-service-port";
extern const char kCastMemoryPressureCriticalFraction[] = extern const char kCastMemoryPressureCriticalFraction[] =
"memory-pressure-critical-fraction"; "memory-pressure-critical-fraction";
extern const char kCastMemoryPressureModerateFraction[] = extern const char kCastMemoryPressureModerateFraction[] =
......
...@@ -89,6 +89,8 @@ extern const char kEnableTopDragGesture[]; ...@@ -89,6 +89,8 @@ extern const char kEnableTopDragGesture[];
extern const char kCastAppBackgroundColor[]; extern const char kCastAppBackgroundColor[];
extern const char kMixerServiceEndpoint[]; extern const char kMixerServiceEndpoint[];
extern const char kMixerServicePort[];
extern const char kCastMemoryPressureCriticalFraction[]; extern const char kCastMemoryPressureCriticalFraction[];
extern const char kCastMemoryPressureModerateFraction[]; extern const char kCastMemoryPressureModerateFraction[];
......
...@@ -55,7 +55,7 @@ void MixerConnection::Connect() { ...@@ -55,7 +55,7 @@ void MixerConnection::Connect() {
if (path.empty()) { if (path.empty()) {
path = kDefaultUnixDomainSocketPath; path = kDefaultUnixDomainSocketPath;
} }
int port = GetSwitchValueNonNegativeInt(switches::kMixerServiceEndpoint, int port = GetSwitchValueNonNegativeInt(switches::kMixerServicePort,
kDefaultTcpPort); kDefaultTcpPort);
connecting_socket_ = AudioSocketService::Connect(path, port); connecting_socket_ = AudioSocketService::Connect(path, port);
......
...@@ -128,7 +128,7 @@ Receiver::Receiver() ...@@ -128,7 +128,7 @@ Receiver::Receiver()
: task_runner_(base::SequencedTaskRunnerHandle::Get()), : task_runner_(base::SequencedTaskRunnerHandle::Get()),
socket_service_( socket_service_(
GetEndpoint(), GetEndpoint(),
GetSwitchValueNonNegativeInt(switches::kMixerServiceEndpoint, GetSwitchValueNonNegativeInt(switches::kMixerServicePort,
mixer_service::kDefaultTcpPort), mixer_service::kDefaultTcpPort),
kMaxAcceptLoop, kMaxAcceptLoop,
this), this),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment