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

Unified Diff: chrome/browser/search/hotword_service_unittest.cc

Issue 1218693004: Add build flag to disable hotwording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2403
Patch Set: Resolve merge conflict. Created 5 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
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/hotword_service_unittest.cc
diff --git a/chrome/browser/search/hotword_service_unittest.cc b/chrome/browser/search/hotword_service_unittest.cc
index a3aef47c5bc1830873267e47c562d1685e2ad8c7..e78e2e783bfe7520183b6e077db3961b6775eaf4 100644
--- a/chrome/browser/search/hotword_service_unittest.cc
+++ b/chrome/browser/search/hotword_service_unittest.cc
@@ -158,6 +158,7 @@ INSTANTIATE_TEST_CASE_P(HotwordServiceTests,
extension_misc::kHotwordSharedModuleId));
TEST_P(HotwordServiceTest, IsHotwordAllowedDisabledFieldTrial) {
+#if defined(ENABLE_HOTWORDING)
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
@@ -190,9 +191,11 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedDisabledFieldTrial) {
// Test that incognito returns false as well.
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(
profile->GetOffTheRecordProfile()));
+#endif
}
TEST_P(HotwordServiceTest, IsHotwordAllowedInvalidFieldTrial) {
+#if defined(ENABLE_HOTWORDING)
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
@@ -213,9 +216,11 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedInvalidFieldTrial) {
// Test that incognito returns false as well.
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(
profile->GetOffTheRecordProfile()));
+#endif
}
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
+#if defined(ENABLE_HOTWORDING)
TestingProfile::Builder profile_builder;
scoped_ptr<TestingProfile> profile = profile_builder.Build();
@@ -246,6 +251,7 @@ TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
Profile* otr_profile = profile->GetOffTheRecordProfile();
SetApplicationLocale(otr_profile, "en");
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile));
+#endif // defined(ENABLE_HOTWORDING)
}
TEST_P(HotwordServiceTest, ShouldReinstallExtension) {
@@ -302,6 +308,7 @@ TEST_P(HotwordServiceTest, PreviousLanguageSetOnInstall) {
}
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) {
+#if defined(ENABLE_HOTWORDING)
InitializeEmptyExtensionService();
service_->Init();
@@ -372,6 +379,7 @@ TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) {
EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile()));
EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension());
EXPECT_EQ(1, hotword_service->uninstall_count()); // no change
+#endif // defined(ENABLE_HOTWORDING)
}
TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) {
« no previous file with comments | « chrome/browser/search/hotword_service.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698