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

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

Issue 1901583005: Revert of Pass task runners to AudioManager constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 1675e2e67d3fe696f4121cd3e404e06e0a1cc65e..38f66d1ba91829a917445c5080c494ae22c81dce 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,6 +26,7 @@
using media::AudioInputController;
using media::AudioInputStream;
+using media::AudioManager;
using media::AudioOutputStream;
using media::AudioParameters;
using media::TestAudioInputController;
@@ -37,7 +38,8 @@
public testing::Test {
public:
SpeechRecognizerImplTest()
- : recognition_started_(false),
+ : io_thread_(BrowserThread::IO, &message_loop_),
+ recognition_started_(false),
recognition_ended_(false),
result_received_(false),
audio_started_(false),
@@ -182,9 +184,10 @@
}
protected:
- TestBrowserThreadBundle thread_bundle_;
+ base::MessageLoopForIO message_loop_;
+ BrowserThreadImpl io_thread_;
scoped_refptr<SpeechRecognizerImpl> recognizer_;
- media::ScopedAudioManagerPtr audio_manager_;
+ std::unique_ptr<AudioManager> 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