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

Unified Diff: chrome/browser/ui/search/instant_tab_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 | « no previous file | chrome/browser/ui/search/search_ipc_router.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/search/instant_tab_unittest.cc
diff --git a/chrome/browser/ui/search/instant_tab_unittest.cc b/chrome/browser/ui/search/instant_tab_unittest.cc
index 39914f43849399d6be3d643937793328fdc46adf..11da6ed1595d5255872387d5910cf25f433a7aa1 100644
--- a/chrome/browser/ui/search/instant_tab_unittest.cc
+++ b/chrome/browser/ui/search/instant_tab_unittest.cc
@@ -75,24 +75,6 @@ void InstantTabTest::SetUp() {
.set_search_box_client_factory_for_testing(std::move(factory));
}
-TEST_F(InstantTabTest, DetermineIfPageSupportsInstant_Local) {
- page.reset(new InstantTab(&delegate, web_contents()));
- EXPECT_FALSE(SupportsInstant());
- page->Init();
- NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
- search_tab()->DetermineIfPageSupportsInstant();
- EXPECT_TRUE(SupportsInstant());
-}
-
-TEST_F(InstantTabTest, DetermineIfPageSupportsInstant_NonLocal) {
- page.reset(new InstantTab(&delegate, web_contents()));
- EXPECT_FALSE(SupportsInstant());
- page->Init();
- NavigateAndCommit(GURL("chrome-search://foo/bar"));
- EXPECT_CALL(mock_search_box, DetermineIfPageSupportsInstant());
- search_tab()->DetermineIfPageSupportsInstant();
-}
-
TEST_F(InstantTabTest, PageURLDoesntBelongToInstantRenderer) {
page.reset(new InstantTab(&delegate, web_contents()));
EXPECT_FALSE(SupportsInstant());
@@ -100,24 +82,16 @@ TEST_F(InstantTabTest, PageURLDoesntBelongToInstantRenderer) {
page->Init();
// 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_search_box, DetermineIfPageSupportsInstant()).Times(0);
- search_tab()->DetermineIfPageSupportsInstant();
EXPECT_FALSE(SupportsInstant());
}
-// Test to verify that ChromeViewMsg_DetermineIfPageSupportsInstant message
-// reply handler updates the instant support state in InstantTab.
TEST_F(InstantTabTest, PageSupportsInstant) {
page.reset(new InstantTab(&delegate, web_contents()));
EXPECT_FALSE(SupportsInstant());
page->Init();
NavigateAndCommit(GURL("chrome-search://foo/bar"));
- EXPECT_CALL(mock_search_box, DetermineIfPageSupportsInstant());
- search_tab()->DetermineIfPageSupportsInstant();
// Assume the page supports instant. Invoke the message reply handler to make
// sure the InstantTab is notified about the instant support state.
« no previous file with comments | « no previous file | chrome/browser/ui/search/search_ipc_router.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698