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

Side by Side Diff: chrome/browser/ui/search/search_ipc_router_unittest.cc

Issue 2884293002: Remove unused embeddedSearch.searchBox APIs (Closed)
Patch Set: . Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/search/search_ipc_router.h" 5 #include "chrome/browser/ui/search/search_ipc_router.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <tuple> 10 #include <tuple>
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 EXPECT_CALL(*mock_search_box(), ThemeChanged(_)).Times(0); 594 EXPECT_CALL(*mock_search_box(), ThemeChanged(_)).Times(0);
595 GetSearchIPCRouter().SendThemeBackgroundInfo(ThemeBackgroundInfo()); 595 GetSearchIPCRouter().SendThemeBackgroundInfo(ThemeBackgroundInfo());
596 } 596 }
597 597
598 TEST_F(SearchIPCRouterTest, SendSubmitMsg) { 598 TEST_F(SearchIPCRouterTest, SendSubmitMsg) {
599 NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar")); 599 NavigateAndCommitActiveTab(GURL("chrome-search://foo/bar"));
600 SetupMockDelegateAndPolicy(); 600 SetupMockDelegateAndPolicy();
601 MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy(); 601 MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
602 EXPECT_CALL(*policy, ShouldSubmitQuery()).Times(1).WillOnce(Return(true)); 602 EXPECT_CALL(*policy, ShouldSubmitQuery()).Times(1).WillOnce(Return(true));
603 603
604 EXPECT_CALL(*mock_search_box(), Submit(_, _)); 604 EXPECT_CALL(*mock_search_box(), Submit(_));
605 GetSearchIPCRouter().Submit(base::string16(), EmbeddedSearchRequestParams()); 605 GetSearchIPCRouter().Submit(EmbeddedSearchRequestParams());
606 } 606 }
607 607
608 TEST_F(SearchIPCRouterTest, DoNotSendSubmitMsg) { 608 TEST_F(SearchIPCRouterTest, DoNotSendSubmitMsg) {
609 NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl)); 609 NavigateAndCommitActiveTab(GURL(chrome::kChromeSearchLocalNtpUrl));
610 SetupMockDelegateAndPolicy(); 610 SetupMockDelegateAndPolicy();
611 MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy(); 611 MockSearchIPCRouterPolicy* policy = GetSearchIPCRouterPolicy();
612 EXPECT_CALL(*policy, ShouldSubmitQuery()).Times(1).WillOnce(Return(false)); 612 EXPECT_CALL(*policy, ShouldSubmitQuery()).Times(1).WillOnce(Return(false));
613 613
614 EXPECT_CALL(*mock_search_box(), Submit(_, _)).Times(0); 614 EXPECT_CALL(*mock_search_box(), Submit(_)).Times(0);
615 GetSearchIPCRouter().Submit(base::string16(), EmbeddedSearchRequestParams()); 615 GetSearchIPCRouter().Submit(EmbeddedSearchRequestParams());
616 } 616 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698