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

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

Issue 1428423002: 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
Index: chrome/browser/ui/search/search_ipc_router_unittest.cc
diff --git a/chrome/browser/ui/search/search_ipc_router_unittest.cc b/chrome/browser/ui/search/search_ipc_router_unittest.cc
index a9507a79697af589a9c9c9bd762188abb1dd9dc1..df25cf8445e17dda24ec74ef8beba9d29dbacbed 100644
--- a/chrome/browser/ui/search/search_ipc_router_unittest.cc
+++ b/chrome/browser/ui/search/search_ipc_router_unittest.cc
@@ -46,7 +46,6 @@ class MockSearchIPCRouterDelegate : public SearchIPCRouter::Delegate {
virtual ~MockSearchIPCRouterDelegate() {}
MOCK_METHOD1(OnInstantSupportDetermined, void(bool supports_instant));
- MOCK_METHOD1(OnSetVoiceSearchSupport, void(bool supports_voice_search));
MOCK_METHOD1(FocusOmnibox, void(OmniboxFocusState state));
MOCK_METHOD3(NavigateToURL, void(const GURL&, WindowOpenDisposition, bool));
MOCK_METHOD1(OnDeleteMostVisitedItem, void(const GURL& url));
@@ -67,7 +66,6 @@ class MockSearchIPCRouterPolicy : public SearchIPCRouter::Policy {
public:
virtual ~MockSearchIPCRouterPolicy() {}
- MOCK_METHOD0(ShouldProcessSetVoiceSearchSupport, bool());
MOCK_METHOD1(ShouldProcessFocusOmnibox, bool(bool));
MOCK_METHOD1(ShouldProcessNavigateToURL, bool(bool));
MOCK_METHOD0(ShouldProcessDeleteMostVisitedItem, bool());
@@ -226,32 +224,6 @@ TEST_F(SearchIPCRouterTest, IgnoreMessagesFromNonInstantRenderers) {
CURRENT_TAB, true));
}
-TEST_F(SearchIPCRouterTest, ProcessVoiceSearchSupportMsg) {
- NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar"));
- SetupMockDelegateAndPolicy();
- MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
- EXPECT_CALL(*mock_delegate(), OnSetVoiceSearchSupport(true)).Times(1);
- EXPECT_CALL(*(policy), ShouldProcessSetVoiceSearchSupport()).Times(1)
- .WillOnce(testing::Return(true));
-
- content::WebContents* contents = web_contents();
- OnMessageReceived(ChromeViewHostMsg_SetVoiceSearchSupported(
- contents->GetRoutingID(), GetSearchIPCRouterSeqNo(), true));
-}
-
-TEST_F(SearchIPCRouterTest, IgnoreVoiceSearchSupportMsg) {
- NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar"));
- EXPECT_CALL(*mock_delegate(), OnSetVoiceSearchSupport(true)).Times(0);
- SetupMockDelegateAndPolicy();
- MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
- EXPECT_CALL(*policy, ShouldProcessSetVoiceSearchSupport()).Times(1)
- .WillOnce(testing::Return(false));
-
- content::WebContents* contents = web_contents();
- OnMessageReceived(ChromeViewHostMsg_SetVoiceSearchSupported(
- contents->GetRoutingID(), GetSearchIPCRouterSeqNo(), true));
-}
-
TEST_F(SearchIPCRouterTest, ProcessFocusOmniboxMsg) {
NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
SetupMockDelegateAndPolicy();

Powered by Google App Engine
This is Rietveld 408576698