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

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

Issue 17132011: Add setVoiceSearchSupported to the searchbox API. This will be used to determine whether to show a … (Closed) Base URL: https://git.chromium.org/chromium/src.git@master
Patch Set: Rebase past 16035020, add test. Created 7 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/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 4384dc73f33fff0e6dbcdb472efeb1d1d78be7e3..762256b99c14bcfed8fd5184c3ef262c3facca75 100644
--- a/chrome/browser/ui/search/search_model_unittest.cc
+++ b/chrome/browser/ui/search/search_model_unittest.cc
@@ -158,3 +158,17 @@ TEST_F(SearchModelTest, UpdateSearchModelState) {
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