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

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

Issue 2077983003: Intiialize AudioManager and related class lazily (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: apply the lazy initialization only to Android Created 4 years, 6 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
Index: content/browser/speech/speech_recognition_browsertest.cc
diff --git a/content/browser/speech/speech_recognition_browsertest.cc b/content/browser/speech/speech_recognition_browsertest.cc
index 5e6f49d93592d79199d5b84bc566f2760e4eee12..089dcea004d65ab5bcab886b2b2a5d863944d43a 100644
--- a/content/browser/speech/speech_recognition_browsertest.cc
+++ b/content/browser/speech/speech_recognition_browsertest.cc
@@ -15,6 +15,7 @@
#include "base/single_thread_task_runner.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h"
+#include "content/browser/browser_main_loop.h"
#include "content/browser/speech/speech_recognition_engine.h"
#include "content/browser/speech/speech_recognition_manager_impl.h"
#include "content/browser/speech/speech_recognizer_impl.h"
@@ -119,6 +120,7 @@ class SpeechRecognitionBrowserTest :
}
void SetUpOnMainThread() override {
+ BrowserMainLoop::GetInstance()->InitializeMediaComponentsIfNeeded();
ASSERT_TRUE(SpeechRecognitionManagerImpl::GetInstance());
SpeechRecognizerImpl::SetAudioManagerForTesting(
new media::MockAudioManager(BrowserThread::GetMessageLoopProxyForThread(

Powered by Google App Engine
This is Rietveld 408576698