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

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

Issue 2045833003: Fix HotwordServiceTest under ubsan: no more vcalls on garbage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix two more test cases Created 4 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/extensions/component_loader_unittest.cc ('k') | no next file » | 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 bff640f46d7abf48f7080e76afcf788d4c13a59e..fd8d5bfc06451ba3118ee29ad7ad3b117c75b624 100644
--- a/chrome/browser/search/hotword_service_unittest.cc
+++ b/chrome/browser/search/hotword_service_unittest.cc
@@ -234,6 +234,8 @@ TEST_P(HotwordServiceTest, ShouldReinstallExtension) {
// Now it's a different locale so it should uninstall.
EXPECT_TRUE(hotword_service->ShouldReinstallHotwordExtension());
+
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_P(HotwordServiceTest, PreviousLanguageSetOnInstall) {
@@ -452,6 +454,7 @@ TEST_P(HotwordServiceTest, IsAlwaysOnEnabled) {
profile()->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
false);
EXPECT_FALSE(hotword_service->IsAlwaysOnEnabled());
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_P(HotwordServiceTest, IsSometimesOnEnabled) {
@@ -501,6 +504,7 @@ TEST_P(HotwordServiceTest, IsSometimesOnEnabled) {
profile()->GetPrefs()->SetBoolean(prefs::kHotwordAlwaysOnSearchEnabled,
false);
EXPECT_FALSE(hotword_service->IsSometimesOnEnabled());
+ base::MessageLoop::current()->RunUntilIdle();
}
TEST_P(HotwordServiceTest, AudioHistorySyncOccurs) {
@@ -531,4 +535,5 @@ TEST_P(HotwordServiceTest, AudioHistorySyncOccurs) {
EXPECT_EQ(2, audio_history_handler->GetAudioHistoryCalls());
EXPECT_TRUE(test_task_runner->HasPendingTask());
test_task_runner->ClearPendingTasks();
+ base::MessageLoop::current()->RunUntilIdle();
}
« no previous file with comments | « chrome/browser/extensions/component_loader_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698