Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Unified Diff: content/browser/speech/speech_recognizer_impl_unittest.cc

Issue 1806313003: Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments from patch 48 Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | media/audio/alsa/alsa_output_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/speech/speech_recognizer_impl_unittest.cc
diff --git a/content/browser/speech/speech_recognizer_impl_unittest.cc b/content/browser/speech/speech_recognizer_impl_unittest.cc
index 38f66d1ba91829a917445c5080c494ae22c81dce..1675e2e67d3fe696f4121cd3e404e06e0a1cc65e 100644
--- a/content/browser/speech/speech_recognizer_impl_unittest.cc
+++ b/content/browser/speech/speech_recognizer_impl_unittest.cc
@@ -8,11 +8,11 @@
#include <vector>
#include "base/sys_byteorder.h"
-#include "content/browser/browser_thread_impl.h"
#include "content/browser/speech/proto/google_streaming_api.pb.h"
#include "content/browser/speech/speech_recognition_engine.h"
#include "content/browser/speech/speech_recognizer_impl.h"
#include "content/public/browser/speech_recognition_event_listener.h"
+#include "content/public/test/test_browser_thread_bundle.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/fake_audio_input_stream.h"
#include "media/audio/fake_audio_output_stream.h"
@@ -26,7 +26,6 @@
using media::AudioInputController;
using media::AudioInputStream;
-using media::AudioManager;
using media::AudioOutputStream;
using media::AudioParameters;
using media::TestAudioInputController;
@@ -38,8 +37,7 @@ class SpeechRecognizerImplTest : public SpeechRecognitionEventListener,
public testing::Test {
public:
SpeechRecognizerImplTest()
- : io_thread_(BrowserThread::IO, &message_loop_),
- recognition_started_(false),
+ : recognition_started_(false),
recognition_ended_(false),
result_received_(false),
audio_started_(false),
@@ -184,10 +182,9 @@ class SpeechRecognizerImplTest : public SpeechRecognitionEventListener,
}
protected:
- base::MessageLoopForIO message_loop_;
- BrowserThreadImpl io_thread_;
+ TestBrowserThreadBundle thread_bundle_;
scoped_refptr<SpeechRecognizerImpl> recognizer_;
- std::unique_ptr<AudioManager> audio_manager_;
+ media::ScopedAudioManagerPtr audio_manager_;
bool recognition_started_;
bool recognition_ended_;
bool result_received_;
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | media/audio/alsa/alsa_output_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698