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") {
test_name = "cast_audio_backend_unittests"
# --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 ]
}
......
......@@ -185,11 +185,14 @@ const char kBackGestureHorizontalThreshold[] =
// Whether to enable detection and dispatch of a 'drag from the top' gesture.
const char kEnableTopDragGesture[] = "enable-top-drag-gesture";
// Endpoint that the mixer service listens on. On Linux/Android, this is a
// path for a UNIX domain socket (default is /tmp/mixer-service). On other
// platforms, this is a TCP port to listen on (on localhost) (default 12854).
// Endpoint that the mixer service listens on. This is a path for a UNIX domain
// socket (default is /tmp/mixer-service).
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[] =
"memory-pressure-critical-fraction";
extern const char kCastMemoryPressureModerateFraction[] =
......
......@@ -89,6 +89,8 @@ extern const char kEnableTopDragGesture[];
extern const char kCastAppBackgroundColor[];
extern const char kMixerServiceEndpoint[];
extern const char kMixerServicePort[];
extern const char kCastMemoryPressureCriticalFraction[];
extern const char kCastMemoryPressureModerateFraction[];
......
......@@ -55,7 +55,7 @@ void MixerConnection::Connect() {
if (path.empty()) {
path = kDefaultUnixDomainSocketPath;
}
int port = GetSwitchValueNonNegativeInt(switches::kMixerServiceEndpoint,
int port = GetSwitchValueNonNegativeInt(switches::kMixerServicePort,
kDefaultTcpPort);
connecting_socket_ = AudioSocketService::Connect(path, port);
......
......@@ -128,7 +128,7 @@ Receiver::Receiver()
: task_runner_(base::SequencedTaskRunnerHandle::Get()),
socket_service_(
GetEndpoint(),
GetSwitchValueNonNegativeInt(switches::kMixerServiceEndpoint,
GetSwitchValueNonNegativeInt(switches::kMixerServicePort,
mixer_service::kDefaultTcpPort),
kMaxAcceptLoop,
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