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

Unified Diff: chrome/browser/ui/webui/web_ui_unittest.cc

Issue 10534098: TabContentsWrapper -> TabContents, part 51. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 6 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/webui/web_ui_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/web_ui_unittest.cc
diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
index 84483393ea642b62ea614e88988d8368bdab4832..caa1d3026af6439784787197ce02cc1e75cdfe4a 100644
--- a/chrome/browser/ui/webui/web_ui_unittest.cc
+++ b/chrome/browser/ui/webui/web_ui_unittest.cc
@@ -5,7 +5,7 @@
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
-#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
+#include "chrome/browser/ui/tab_contents/tab_contents.h"
#include "chrome/browser/ui/tab_contents/test_tab_contents.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_profile.h"
@@ -34,8 +34,8 @@ class WebUITest : public TabContentsTestHarness {
// state, through pending, committed, then another navigation. The first page
// ID that we should use is passed as a parameter. We'll use the next two
// values. This must be increasing for the life of the tests.
- static void DoNavigationTest(TabContentsWrapper* wrapper, int page_id) {
- WebContents* contents = wrapper->web_contents();
+ static void DoNavigationTest(TabContents* tab_contents, int page_id) {
+ WebContents* contents = tab_contents->web_contents();
NavigationController* controller = &contents->GetController();
// Start a pending load.
@@ -49,7 +49,7 @@ class WebUITest : public TabContentsTestHarness {
ASSERT_FALSE(controller->GetLastCommittedEntry());
// Check the things the pending Web UI should have set.
- EXPECT_FALSE(wrapper->favicon_tab_helper()->ShouldDisplayFavicon());
+ EXPECT_FALSE(tab_contents->favicon_tab_helper()->ShouldDisplayFavicon());
EXPECT_TRUE(contents->FocusLocationBarByDefault());
// Now commit the load.
@@ -57,7 +57,7 @@ class WebUITest : public TabContentsTestHarness {
contents->GetRenderViewHost())->SendNavigate(page_id, new_tab_url);
// The same flags should be set as before now that the load has committed.
- EXPECT_FALSE(wrapper->favicon_tab_helper()->ShouldDisplayFavicon());
+ EXPECT_FALSE(tab_contents->favicon_tab_helper()->ShouldDisplayFavicon());
EXPECT_TRUE(contents->FocusLocationBarByDefault());
// Start a pending navigation to a regular page.
@@ -68,7 +68,7 @@ class WebUITest : public TabContentsTestHarness {
// Check the flags. Some should reflect the new page (URL, title), some
// should reflect the old one (bookmark bar) until it has committed.
- EXPECT_TRUE(wrapper->favicon_tab_helper()->ShouldDisplayFavicon());
+ EXPECT_TRUE(tab_contents->favicon_tab_helper()->ShouldDisplayFavicon());
EXPECT_FALSE(contents->FocusLocationBarByDefault());
// Commit the regular page load. Note that we must send it to the "pending"
@@ -87,7 +87,7 @@ class WebUITest : public TabContentsTestHarness {
}
// The state should now reflect a regular page.
- EXPECT_TRUE(wrapper->favicon_tab_helper()->ShouldDisplayFavicon());
+ EXPECT_TRUE(tab_contents->favicon_tab_helper()->ShouldDisplayFavicon());
EXPECT_FALSE(contents->FocusLocationBarByDefault());
}
@@ -109,9 +109,9 @@ TEST_F(WebUITest, WebUIToStandard) {
// alive), which will trigger different behavior in RenderViewHostManager.
WebContents* contents2 =
WebContentsTester::CreateTestWebContents(profile(), NULL);
- TabContentsWrapper wrapper2(contents2);
+ TabContents tab_contents2(contents2);
- DoNavigationTest(&wrapper2, 101);
+ DoNavigationTest(&tab_contents2, 101);
}
TEST_F(WebUITest, WebUIToWebUI) {
« no previous file with comments | « chrome/browser/ui/webui/web_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698