Lines 157-162
INSTANTIATE_TEST_CASE_P(HotwordServiceTests,
Link Here
|
157 |
extension_misc::kHotwordSharedModuleId)); |
157 |
extension_misc::kHotwordSharedModuleId)); |
158 |
|
158 |
|
159 |
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) { |
159 |
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) { |
|
|
160 |
#if defined(ENABLE_HOTWORDING) |
160 |
TestingProfile::Builder profile_builder; |
161 |
TestingProfile::Builder profile_builder; |
161 |
scoped_ptr<TestingProfile> profile = profile_builder.Build(); |
162 |
scoped_ptr<TestingProfile> profile = profile_builder.Build(); |
162 |
|
163 |
|
Lines 187-192
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
Link Here
|
187 |
Profile* otr_profile = profile->GetOffTheRecordProfile(); |
188 |
Profile* otr_profile = profile->GetOffTheRecordProfile(); |
188 |
SetApplicationLocale(otr_profile, "en"); |
189 |
SetApplicationLocale(otr_profile, "en"); |
189 |
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile)); |
190 |
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile)); |
|
|
191 |
#endif // defined(ENABLE_HOTWORDING) |
190 |
} |
192 |
} |
191 |
|
193 |
|
192 |
TEST_P(HotwordServiceTest, ShouldReinstallExtension) { |
194 |
TEST_P(HotwordServiceTest, ShouldReinstallExtension) { |
Lines 243-248
TEST_P(HotwordServiceTest, PreviousLanguageSetOnInstall) {
Link Here
|
243 |
} |
245 |
} |
244 |
|
246 |
|
245 |
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) { |
247 |
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) { |
|
|
248 |
#if defined(ENABLE_HOTWORDING) |
246 |
InitializeEmptyExtensionService(); |
249 |
InitializeEmptyExtensionService(); |
247 |
service_->Init(); |
250 |
service_->Init(); |
248 |
|
251 |
|
Lines 313-318
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) {
Link Here
|
313 |
EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile())); |
316 |
EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile())); |
314 |
EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension()); |
317 |
EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension()); |
315 |
EXPECT_EQ(1, hotword_service->uninstall_count()); // no change |
318 |
EXPECT_EQ(1, hotword_service->uninstall_count()); // no change |
|
|
319 |
#endif // defined(ENABLE_HOTWORDING) |
316 |
} |
320 |
} |
317 |
|
321 |
|
318 |
TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) { |
322 |
TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) { |