Commit 9a369045 authored by Max Morin's avatar Max Morin Committed by Commit Bot

Speed up AudioRendererSinkCacheTest.

This test suite takes 4000 ms on my machine. By removing all the Sleeps
and using mock time instead, this CL reduces the time to 40 ms.

Bug: None
Change-Id: Id9cb35aa04fc5e576a8886d0c183542fc9fcc0f8
Reviewed-on: https://chromium-review.googlesource.com/962446
Commit-Queue: Max Morin <maxmorin@chromium.org>
Reviewed-by: default avatarOlga Sharonova <olka@chromium.org>
Cr-Commit-Position: refs/heads/master@{#543351}
parent ff20be5f
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
#ifndef CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_H_ #ifndef CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_H_
#define CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_H_ #define CONTENT_RENDERER_MEDIA_AUDIO_RENDERER_SINK_CACHE_H_
#include <memory>
#include <string> #include <string>
#include "base/memory/scoped_refptr.h"
#include "content/common/content_export.h" #include "content/common/content_export.h"
#include "media/base/output_device_info.h" #include "media/base/output_device_info.h"
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "content/renderer/media/audio_renderer_sink_cache_impl.h"
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>
#include <utility> #include <utility>
...@@ -13,7 +15,6 @@ ...@@ -13,7 +15,6 @@
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "content/renderer/media/audio_device_factory.h" #include "content/renderer/media/audio_device_factory.h"
#include "content/renderer/media/audio_renderer_sink_cache_impl.h"
#include "media/audio/audio_device_description.h" #include "media/audio/audio_device_description.h"
#include "media/base/audio_renderer_sink.h" #include "media/base/audio_renderer_sink.h"
#include "url/origin.h" #include "url/origin.h"
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/callback.h"
#include "base/memory/weak_ptr.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "base/synchronization/lock.h" #include "base/synchronization/lock.h"
#include "base/time/time.h" #include "base/time/time.h"
......
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