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

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

Issue 2852693002: Remove DetermineIfPageSupportsInstant and all its plumbing (Closed)
Patch Set: rebase Created 3 years, 8 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_tab_helper.cc ('k') | chrome/common/instant.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/search_tab_helper_unittest.cc
diff --git a/chrome/browser/ui/search/search_tab_helper_unittest.cc b/chrome/browser/ui/search/search_tab_helper_unittest.cc
index dee6663ac633001bc363ebec866478c371c8c904..89eec858eaef418078c3a082c486c12f814023b5 100644
--- a/chrome/browser/ui/search/search_tab_helper_unittest.cc
+++ b/chrome/browser/ui/search/search_tab_helper_unittest.cc
@@ -139,51 +139,6 @@ class SearchTabHelperTest : public ChromeRenderViewHostTestHarness {
MockSearchBox mock_search_box_;
};
-TEST_F(SearchTabHelperTest, DetermineIfPageSupportsInstant_Local) {
- NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
- EXPECT_CALL(*mock_delegate(), OnInstantSupportDetermined(true)).Times(0);
-
- SearchTabHelper* search_tab_helper =
- SearchTabHelper::FromWebContents(web_contents());
- ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper);
- search_tab_helper->ipc_router_for_testing().set_delegate_for_testing(
- mock_delegate());
- search_tab_helper->DetermineIfPageSupportsInstant();
-}
-
-TEST_F(SearchTabHelperTest, DetermineIfPageSupportsInstant_NonLocal) {
- NavigateAndCommit(GURL("chrome-search://foo/bar"));
- EXPECT_CALL(*mock_delegate(), OnInstantSupportDetermined(true)).Times(1);
-
- SearchTabHelper* search_tab_helper =
- SearchTabHelper::FromWebContents(web_contents());
- ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper);
- search_tab_helper->ipc_router_for_testing().set_delegate_for_testing(
- mock_delegate());
- EXPECT_CALL(*mock_search_box(), DetermineIfPageSupportsInstant());
- search_tab_helper->DetermineIfPageSupportsInstant();
-
- search_tab_helper->ipc_router_for_testing().InstantSupportDetermined(
- search_tab_helper->ipc_router_for_testing().page_seq_no_for_testing(),
- true);
-}
-
-TEST_F(SearchTabHelperTest, PageURLDoesntBelongToInstantRenderer) {
- // Navigate to a page URL that doesn't belong to Instant renderer.
- // SearchTabHelper::DeterminerIfPageSupportsInstant() should return
- // immediately without dispatching any message to the renderer.
- NavigateAndCommit(GURL("http://www.example.com"));
- EXPECT_CALL(*mock_delegate(), OnInstantSupportDetermined(false)).Times(0);
-
- SearchTabHelper* search_tab_helper =
- SearchTabHelper::FromWebContents(web_contents());
- ASSERT_NE(static_cast<SearchTabHelper*>(NULL), search_tab_helper);
- search_tab_helper->ipc_router_for_testing().set_delegate_for_testing(
- mock_delegate());
- EXPECT_CALL(*mock_search_box(), DetermineIfPageSupportsInstant()).Times(0);
- search_tab_helper->DetermineIfPageSupportsInstant();
-}
-
TEST_F(SearchTabHelperTest, OnChromeIdentityCheckMatch) {
NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
CreateSigninManager(std::string("foo@bar.com"));
« no previous file with comments | « chrome/browser/ui/search/search_tab_helper.cc ('k') | chrome/common/instant.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698