| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <array> | 5 #include <array> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop/message_loop.h" |
| 10 #include "base/test/test_simple_task_runner.h" | 11 #include "base/test/test_simple_task_runner.h" |
| 11 #include "base/test/test_timeouts.h" | 12 #include "base/test/test_timeouts.h" |
| 12 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 13 #include "content/renderer/media/audio_renderer_sink_cache_impl.h" | 14 #include "content/renderer/media/audio_renderer_sink_cache_impl.h" |
| 14 #include "media/audio/audio_device_description.h" | 15 #include "media/audio/audio_device_description.h" |
| 15 #include "media/base/audio_parameters.h" | 16 #include "media/base/audio_parameters.h" |
| 16 #include "media/base/mock_audio_renderer_sink.h" | 17 #include "media/base/mock_audio_renderer_sink.h" |
| 17 #include "media/base/test_helpers.h" | 18 #include "media/base/test_helpers.h" |
| 18 #include "testing/gmock/include/gmock/gmock.h" | 19 #include "testing/gmock/include/gmock/gmock.h" |
| 19 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 // Wait for completion of all the tasks posted to at least one thread. | 382 // Wait for completion of all the tasks posted to at least one thread. |
| 382 media::WaitableMessageLoopEvent loop_event( | 383 media::WaitableMessageLoopEvent loop_event( |
| 383 TestTimeouts::action_max_timeout()); | 384 TestTimeouts::action_max_timeout()); |
| 384 threads[kThreadCount - 1]->task_runner()->PostTaskAndReply( | 385 threads[kThreadCount - 1]->task_runner()->PostTaskAndReply( |
| 385 FROM_HERE, base::Bind(&base::DoNothing), loop_event.GetClosure()); | 386 FROM_HERE, base::Bind(&base::DoNothing), loop_event.GetClosure()); |
| 386 // Runs the loop and waits for the thread to call event's closure. | 387 // Runs the loop and waits for the thread to call event's closure. |
| 387 loop_event.RunAndWait(); | 388 loop_event.RunAndWait(); |
| 388 } | 389 } |
| 389 | 390 |
| 390 } // namespace content | 391 } // namespace content |
| OLD | NEW |