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

Unified Diff: content/browser/tab_contents/tab_contents_unittest.cc

Issue 8956050: Rename TabContents::controller() to GetController and put it into the WebContents interface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 | « content/browser/tab_contents/tab_contents.cc ('k') | content/browser/tab_contents/test_tab_contents.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents_unittest.cc
===================================================================
--- content/browser/tab_contents/tab_contents_unittest.cc (revision 115228)
+++ content/browser/tab_contents/tab_contents_unittest.cc (working copy)
@@ -464,9 +464,9 @@
// Open a new tab with the same SiteInstance, navigated to the same site.
TestTabContents contents2(browser_context_.get(), instance1);
contents2.transition_cross_site = true;
- contents2.controller().LoadURL(url, content::Referrer(),
- content::PAGE_TRANSITION_TYPED,
- std::string());
+ contents2.GetController().LoadURL(url, content::Referrer(),
+ content::PAGE_TRANSITION_TYPED,
+ std::string());
// Need this page id to be 2 since the site instance is the same (which is the
// scope of page IDs) and we want to consider this a new page.
contents2.TestDidNavigate(
@@ -486,9 +486,9 @@
// Navigate second tab to the same site as the first tab
const GURL url2b("http://mail.yahoo.com");
- contents2.controller().LoadURL(url2b, content::Referrer(),
- content::PAGE_TRANSITION_TYPED,
- std::string());
+ contents2.GetController().LoadURL(url2b, content::Referrer(),
+ content::PAGE_TRANSITION_TYPED,
+ std::string());
TestRenderViewHost* rvh2 =
static_cast<TestRenderViewHost*>(contents2.GetRenderViewHost());
rvh2->SendShouldCloseACK(true);
@@ -526,9 +526,9 @@
TestTabContents contents2(browser_context_.get(), instance1);
contents2.transition_cross_site = true;
const GURL url2("http://www.yahoo.com");
- contents2.controller().LoadURL(url2, content::Referrer(),
- content::PAGE_TRANSITION_TYPED,
- std::string());
+ contents2.GetController().LoadURL(url2, content::Referrer(),
+ content::PAGE_TRANSITION_TYPED,
+ std::string());
// The first RVH in contents2 isn't live yet, so we shortcut the cross site
// pending.
TestRenderViewHost* rvh2 = static_cast<TestRenderViewHost*>(
@@ -1640,7 +1640,7 @@
const GURL kGURL(kUrl);
// Start a navigation to a page
- contents()->controller().LoadURL(
+ contents()->GetController().LoadURL(
kGURL, content::Referrer(), content::PAGE_TRANSITION_TYPED,
std::string());
@@ -1656,7 +1656,7 @@
// Initiate a new navigation from the browser that also triggers an
// interstitial.
- contents()->controller().LoadURL(
+ contents()->GetController().LoadURL(
kGURL, content::Referrer(), content::PAGE_TRANSITION_TYPED,
std::string());
TestInterstitialPage::InterstitialState state2 =
@@ -1669,7 +1669,7 @@
interstitial2->TestDidNavigate(1, kGURL);
// Make sure we still have an entry.
- NavigationEntry* entry = contents()->controller().pending_entry();
+ NavigationEntry* entry = contents()->GetController().pending_entry();
ASSERT_TRUE(entry);
EXPECT_EQ(kUrl, entry->url().spec());
@@ -1687,7 +1687,7 @@
const GURL kGURL(kUrl);
// Start a navigation to a page
- contents()->controller().LoadURL(
+ contents()->GetController().LoadURL(
kGURL, content::Referrer(), content::PAGE_TRANSITION_TYPED,
std::string());
// DidNavigate from the page
@@ -1742,7 +1742,7 @@
// Create another NavigationController.
GURL url3("http://foo2");
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents());
- NavigationController& other_controller = other_contents->controller();
+ NavigationController& other_controller = other_contents->GetController();
other_contents->NavigateAndCommit(url3);
other_contents->ExpectSetHistoryLengthAndPrune(
other_controller.GetEntryAtIndex(0)->site_instance(), 1,
@@ -1768,7 +1768,7 @@
// Create another NavigationController.
scoped_ptr<TestTabContents> other_contents(CreateTestTabContents());
- NavigationController& other_controller = other_contents->controller();
+ NavigationController& other_controller = other_contents->GetController();
// Navigate it to url2.
GURL url2("http://foo2");
« no previous file with comments | « content/browser/tab_contents/tab_contents.cc ('k') | content/browser/tab_contents/test_tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698