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

Unified Diff: chrome/browser/ui/search/search_model_unittest.cc

Issue 1436583002: Revert of Remove setVoiceSearchSupported part of EmbeddedSearch SearchBox API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/ui/search/search_model.cc ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_model_unittest.cc
diff --git a/chrome/browser/ui/search/search_model_unittest.cc b/chrome/browser/ui/search/search_model_unittest.cc
index 565b1cd41aa101e0811ebda70b363aa031ea6515..646639e3d8698daec1defac9cad15b825b932bd4 100644
--- a/chrome/browser/ui/search/search_model_unittest.cc
+++ b/chrome/browser/ui/search/search_model_unittest.cc
@@ -141,3 +141,17 @@
mock_observer.VerifyNotificationCount(1);
EXPECT_TRUE(model->state() == expected_new_state);
}
+
+TEST_F(SearchModelTest, UpdateVoiceSearchSupported) {
+ mock_observer.VerifyNotificationCount(0);
+ EXPECT_FALSE(model->voice_search_supported());
+
+ SearchModel::State expected_old_state = model->state();
+ SearchModel::State expected_new_state(model->state());
+ expected_new_state.voice_search_supported = true;
+
+ model->SetVoiceSearchSupported(true);
+ mock_observer.VerifySearchModelStates(expected_old_state, expected_new_state);
+ mock_observer.VerifyNotificationCount(1);
+ EXPECT_TRUE(model->voice_search_supported());
+}
« no previous file with comments | « chrome/browser/ui/search/search_model.cc ('k') | chrome/browser/ui/search/search_tab_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698