Commit 1c126c8e authored by Dale Curtis's avatar Dale Curtis Committed by Commit Bot

Switch to using a UI type MessagePump for macOS media_unitests.

For some reason the MessagePumpDefault isn't scheduled with enough
precision to execute 20ms interval callbacks, so our fake audio path
ends up lagging further and further behind and slowing down tests.

BUG=1003761,1014646
TEST=osxbeta-rel trybot passes.
R=tmathmeyer

Change-Id: Icc0fa9ef9ff698d866ff77aab86206be2f16a23d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1906120Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#714041}
parent 03c7a27a
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "base/run_loop.h" #include "base/run_loop.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "build/build_config.h"
#include "media/base/media_log.h" #include "media/base/media_log.h"
#include "media/base/media_switches.h" #include "media/base/media_switches.h"
#include "media/base/media_tracks.h" #include "media/base/media_tracks.h"
...@@ -125,7 +126,14 @@ class RendererFactoryImpl final : public PipelineTestRendererFactory { ...@@ -125,7 +126,14 @@ class RendererFactoryImpl final : public PipelineTestRendererFactory {
}; };
PipelineIntegrationTestBase::PipelineIntegrationTestBase() PipelineIntegrationTestBase::PipelineIntegrationTestBase()
: hashing_enabled_(false), :
// Use a UI type message loop on macOS, because it doesn't seem to schedule
// callbacks with enough precision to drive our fake audio output. See
// https://crbug.com/1014646 for more details.
#if defined(OS_MACOSX)
task_environment_(base::test::TaskEnvironment::MainThreadType::UI),
#endif
hashing_enabled_(false),
clockless_playback_(false), clockless_playback_(false),
webaudio_attached_(false), webaudio_attached_(false),
mono_output_(false), mono_output_(false),
......
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