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

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

Issue 2146953002: Rename InstantPage to InstantTab. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@instant-page
Patch Set: Created 4 years, 5 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/instant_tab.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/instant_tab_unittest.cc
diff --git a/chrome/browser/ui/search/instant_page_unittest.cc b/chrome/browser/ui/search/instant_tab_unittest.cc
similarity index 83%
rename from chrome/browser/ui/search/instant_page_unittest.cc
rename to chrome/browser/ui/search/instant_tab_unittest.cc
index c028d778bdfbccfa9ff7fa8a867257a637b27ee7..9161b0d3611a11318750d5ccf5cdcd7f32eabb3a 100644
--- a/chrome/browser/ui/search/instant_page_unittest.cc
+++ b/chrome/browser/ui/search/instant_tab_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/ui/search/instant_page.h"
+#include "chrome/browser/ui/search/instant_tab.h"
#include <stdint.h>
@@ -27,7 +27,7 @@ class Profile;
namespace {
-class FakePageDelegate : public InstantPage::Delegate {
+class FakePageDelegate : public InstantTab::Delegate {
public:
virtual ~FakePageDelegate() {
}
@@ -35,9 +35,9 @@ class FakePageDelegate : public InstantPage::Delegate {
MOCK_METHOD2(InstantSupportDetermined,
void(const content::WebContents* contents,
bool supports_instant));
- MOCK_METHOD1(InstantPageRenderProcessGone,
+ MOCK_METHOD1(InstantTabRenderProcessGone,
void(const content::WebContents* contents));
- MOCK_METHOD2(InstantPageAboutToNavigateMainFrame,
+ MOCK_METHOD2(InstantTabAboutToNavigateMainFrame,
void(const content::WebContents* contents,
const GURL& url));
MOCK_METHOD5(NavigateToURL,
@@ -50,7 +50,7 @@ class FakePageDelegate : public InstantPage::Delegate {
} // namespace
-class InstantPageTest : public ChromeRenderViewHostTestHarness {
+class InstantTabTest : public ChromeRenderViewHostTestHarness {
public:
void SetUp() override;
@@ -58,17 +58,17 @@ class InstantPageTest : public ChromeRenderViewHostTestHarness {
return process()->sink().GetFirstMessageMatching(id) != NULL;
}
- std::unique_ptr<InstantPage> page;
+ std::unique_ptr<InstantTab> page;
FakePageDelegate delegate;
};
-void InstantPageTest::SetUp() {
+void InstantTabTest::SetUp() {
ChromeRenderViewHostTestHarness::SetUp();
SearchTabHelper::CreateForWebContents(web_contents());
}
-TEST_F(InstantPageTest, IsLocal) {
- page.reset(new InstantPage(&delegate));
+TEST_F(InstantTabTest, IsLocal) {
+ page.reset(new InstantTab(&delegate));
EXPECT_FALSE(page->supports_instant());
EXPECT_FALSE(page->IsLocal());
page->SetContents(web_contents());
@@ -78,8 +78,8 @@ TEST_F(InstantPageTest, IsLocal) {
EXPECT_FALSE(page->IsLocal());
}
-TEST_F(InstantPageTest, DetermineIfPageSupportsInstant_Local) {
- page.reset(new InstantPage(&delegate));
+TEST_F(InstantTabTest, DetermineIfPageSupportsInstant_Local) {
+ page.reset(new InstantTab(&delegate));
EXPECT_FALSE(page->supports_instant());
page->SetContents(web_contents());
NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
@@ -91,8 +91,8 @@ TEST_F(InstantPageTest, DetermineIfPageSupportsInstant_Local) {
EXPECT_TRUE(page->supports_instant());
}
-TEST_F(InstantPageTest, DetermineIfPageSupportsInstant_NonLocal) {
- page.reset(new InstantPage(&delegate));
+TEST_F(InstantTabTest, DetermineIfPageSupportsInstant_NonLocal) {
+ page.reset(new InstantTab(&delegate));
EXPECT_FALSE(page->supports_instant());
page->SetContents(web_contents());
NavigateAndCommit(GURL("chrome-search://foo/bar"));
@@ -106,8 +106,8 @@ TEST_F(InstantPageTest, DetermineIfPageSupportsInstant_NonLocal) {
EXPECT_EQ(web_contents()->GetRoutingID(), message->routing_id());
}
-TEST_F(InstantPageTest, PageURLDoesntBelongToInstantRenderer) {
- page.reset(new InstantPage(&delegate));
+TEST_F(InstantTabTest, PageURLDoesntBelongToInstantRenderer) {
+ page.reset(new InstantTab(&delegate));
EXPECT_FALSE(page->supports_instant());
NavigateAndCommit(GURL(chrome::kChromeSearchLocalNtpUrl));
page->SetContents(web_contents());
@@ -130,9 +130,9 @@ TEST_F(InstantPageTest, PageURLDoesntBelongToInstantRenderer) {
}
// Test to verify that ChromeViewMsg_DetermineIfPageSupportsInstant message
-// reply handler updates the instant support state in InstantPage.
-TEST_F(InstantPageTest, PageSupportsInstant) {
- page.reset(new InstantPage(&delegate));
+// reply handler updates the instant support state in InstantTab.
+TEST_F(InstantTabTest, PageSupportsInstant) {
+ page.reset(new InstantTab(&delegate));
EXPECT_FALSE(page->supports_instant());
page->SetContents(web_contents());
NavigateAndCommit(GURL("chrome-search://foo/bar"));
@@ -148,7 +148,7 @@ TEST_F(InstantPageTest, PageSupportsInstant) {
.Times(1);
// Assume the page supports instant. Invoke the message reply handler to make
- // sure the InstantPage is notified about the instant support state.
+ // sure the InstantTab is notified about the instant support state.
const content::NavigationEntry* entry =
web_contents()->GetController().GetLastCommittedEntry();
EXPECT_TRUE(entry);
« no previous file with comments | « chrome/browser/ui/search/instant_tab.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