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

Unified Diff: chrome/browser/extensions/component_loader_unittest.cc

Issue 795393002: [Hotword] Implement IsHotwordHardwareAvailable() using device types. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failures due to double init of cras audio handler Created 6 years 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 | « ash/system/chromeos/audio/audio_detailed_view.cc ('k') | chrome/browser/search/hotword_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/component_loader_unittest.cc
diff --git a/chrome/browser/extensions/component_loader_unittest.cc b/chrome/browser/extensions/component_loader_unittest.cc
index c8625b1b78e07507d44731dc4f7c71c66b12cef0..363f7a530d334b7bb189fc0a6bbe29859ab6bfa4 100644
--- a/chrome/browser/extensions/component_loader_unittest.cc
+++ b/chrome/browser/extensions/component_loader_unittest.cc
@@ -25,6 +25,10 @@
#include "extensions/common/manifest_handlers/background_info.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_CHROMEOS)
+#include "chromeos/audio/cras_audio_handler.h"
+#endif
+
namespace extensions {
namespace {
@@ -101,6 +105,12 @@ class ComponentLoaderTest : public testing::Test {
#if defined(OS_CHROMEOS)
local_state_.registry()->RegisterBooleanPref(
prefs::kAccessibilitySpokenFeedbackEnabled, false);
+
+ // Tests on chromeos need to have the handler initialized because the
+ // Hotword component extension uses it to determine which extension to
+ // load.
+ if (!chromeos::CrasAudioHandler::IsInitialized())
+ chromeos::CrasAudioHandler::InitializeForTesting();
#endif
}
« no previous file with comments | « ash/system/chromeos/audio/audio_detailed_view.cc ('k') | chrome/browser/search/hotword_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698