Lines 216-221
TEST_P(HotwordServiceTest, IsHotwordAllowedInvalidFieldTrial) {
Link Here
|
216 |
} |
216 |
} |
217 |
|
217 |
|
218 |
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) { |
218 |
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) { |
|
|
219 |
#if defined(ENABLE_HOTWORDING) |
219 |
TestingProfile::Builder profile_builder; |
220 |
TestingProfile::Builder profile_builder; |
220 |
scoped_ptr<TestingProfile> profile = profile_builder.Build(); |
221 |
scoped_ptr<TestingProfile> profile = profile_builder.Build(); |
221 |
|
222 |
|
Lines 246-251
TEST_P(HotwordServiceTest, IsHotwordAllowedLocale) {
Link Here
|
246 |
Profile* otr_profile = profile->GetOffTheRecordProfile(); |
247 |
Profile* otr_profile = profile->GetOffTheRecordProfile(); |
247 |
SetApplicationLocale(otr_profile, "en"); |
248 |
SetApplicationLocale(otr_profile, "en"); |
248 |
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile)); |
249 |
EXPECT_FALSE(HotwordServiceFactory::IsHotwordAllowed(otr_profile)); |
|
|
250 |
#endif // defined(ENABLE_HOTWORDING) |
249 |
} |
251 |
} |
250 |
|
252 |
|
251 |
TEST_P(HotwordServiceTest, ShouldReinstallExtension) { |
253 |
TEST_P(HotwordServiceTest, ShouldReinstallExtension) { |
Lines 302-307
TEST_P(HotwordServiceTest, PreviousLanguageSetOnInstall) {
Link Here
|
302 |
} |
304 |
} |
303 |
|
305 |
|
304 |
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) { |
306 |
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) { |
|
|
307 |
#if defined(ENABLE_HOTWORDING) |
305 |
InitializeEmptyExtensionService(); |
308 |
InitializeEmptyExtensionService(); |
306 |
service_->Init(); |
309 |
service_->Init(); |
307 |
|
310 |
|
Lines 372-377
TEST_P(HotwordServiceTest, UninstallReinstallTriggeredCorrectly) {
Link Here
|
372 |
EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile())); |
375 |
EXPECT_TRUE(HotwordServiceFactory::IsHotwordAllowed(profile())); |
373 |
EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension()); |
376 |
EXPECT_FALSE(hotword_service->MaybeReinstallHotwordExtension()); |
374 |
EXPECT_EQ(1, hotword_service->uninstall_count()); // no change |
377 |
EXPECT_EQ(1, hotword_service->uninstall_count()); // no change |
|
|
378 |
#endif // defined(ENABLE_HOTWORDING) |
375 |
} |
379 |
} |
376 |
|
380 |
|
377 |
TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) { |
381 |
TEST_P(HotwordServiceTest, DisableAlwaysOnOnLanguageChange) { |