Commit 9855fd4c authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[ChromeOS] AudioPlayerBrowserTest: use faked audio layer

These AudioPlayerBrowserTest run on a target_os="chromeos" linux build
which attempts to use PulseAudio for audio, and always fails [1].

The tests still PASS, since they don't need to test lower-layer audio,
but they do output PulseAudio LOG failure messages. To avoid that, use
a fake audio layer instead, which can be requested by a media command-
line switch kDisableAudioOutput after crrev.com/539638.

[1] PulseAudio won't work in this case and the LOG output of the tests
indicate that (see bug 835626 comments #3 and #7).

Bug: 835626,835742
Change-Id: I8113c15a123bfb8048141e7a20c8d02cf3341e13
Reviewed-on: https://chromium-review.googlesource.com/1047045Reviewed-by: default avatarTatsuhisa Yamaguchi <yamaguchi@chromium.org>
Reviewed-by: default avatarNaoki Fukino <fukino@chromium.org>
Reviewed-by: default avatarMax Morin <maxmorin@chromium.org>
Commit-Queue: Noel Gordon <noel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#556704}
parent 91ec2e89
......@@ -4,11 +4,22 @@
#include "chrome/browser/chromeos/file_manager/file_manager_browsertest_base.h"
#include "media/base/media_switches.h"
namespace file_manager {
static constexpr bool kUseFakeAudioLayer = true;
template <GuestMode MODE>
class AudioPlayerBrowserTestBase : public FileManagerBrowserTestBase {
public:
void SetUpCommandLine(base::CommandLine* command_line) override {
if (kUseFakeAudioLayer)
command_line->AppendSwitch(switches::kDisableAudioOutput);
FileManagerBrowserTestBase::SetUpCommandLine(command_line);
}
GuestMode GetGuestMode() const override { return MODE; }
const char* GetTestCaseName() const override {
......
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