| 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) {
|
|
|