summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 05:09:04 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 05:09:04 +0000
commit69cda6547de3c2bc25e6476607e7550ba548cac9 (patch)
treee54f39838f04e0e61921cd7457711019be8b545f /chrome/test
parentc691a593ac199d774a43f239342cd85c80ca1a2a (diff)
downloadchromium_src-69cda6547de3c2bc25e6476607e7550ba548cac9.zip
chromium_src-69cda6547de3c2bc25e6476607e7550ba548cac9.tar.gz
chromium_src-69cda6547de3c2bc25e6476607e7550ba548cac9.tar.bz2
Rename TabContents::controller() to GetController and put it into the WebContents namespace.
BUG=98716 TBR=dpranke Review URL: http://codereview.chromium.org/8956050 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115276 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/base/browser_with_test_window_test.cc4
-rw-r--r--chrome/test/base/browser_with_test_window_test.h2
-rw-r--r--chrome/test/base/test_html_dialog_observer.cc4
-rw-r--r--chrome/test/base/test_tab_strip_model_observer.cc2
-rw-r--r--chrome/test/base/ui_test_utils.cc14
5 files changed, 13 insertions, 13 deletions
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index a6c0fe0..ec8b2c0 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -66,7 +66,7 @@ void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
params.tabstrip_index = 0;
params.disposition = NEW_FOREGROUND_TAB;
browser::Navigate(&params);
- CommitPendingLoad(&params.target_contents->tab_contents()->controller());
+ CommitPendingLoad(&params.target_contents->tab_contents()->GetController());
}
void BrowserWithTestWindowTest::CommitPendingLoad(
@@ -121,7 +121,7 @@ void BrowserWithTestWindowTest::NavigateAndCommit(
}
void BrowserWithTestWindowTest::NavigateAndCommitActiveTab(const GURL& url) {
- NavigateAndCommit(&browser()->GetSelectedTabContents()->controller(), url);
+ NavigateAndCommit(&browser()->GetSelectedTabContents()->GetController(), url);
}
void BrowserWithTestWindowTest::DestroyBrowser() {
diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h
index 34ecb6c..e48aa36 100644
--- a/chrome/test/base/browser_with_test_window_test.h
+++ b/chrome/test/base/browser_with_test_window_test.h
@@ -37,7 +37,7 @@ class NavigationController;
// // Add a new tab and navigate it. This will be at index 0.
// AddTab(browser(), GURL("http://foo/1"));
// NavigationController* controller =
-// &browser()->GetTabContentsAt(0)->controller();
+// &browser()->GetTabContentsAt(0)->GetController();
//
// // Navigate somewhere else.
// GURL url2("http://foo/2");
diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc
index 1221fa4..6b648d5 100644
--- a/chrome/test/base/test_html_dialog_observer.cc
+++ b/chrome/test/base/test_html_dialog_observer.cc
@@ -48,13 +48,13 @@ void TestHtmlDialogObserver::Observe(
// navigate in this method, ensuring that this is not a race condition.
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &web_ui_->tab_contents()->controller()));
+ &web_ui_->tab_contents()->GetController()));
break;
case content::NOTIFICATION_LOAD_STOP:
DCHECK(web_ui_);
registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &web_ui_->tab_contents()->controller()));
+ &web_ui_->tab_contents()->GetController()));
done_ = true;
// If the message loop is running stop it.
if (running_) {
diff --git a/chrome/test/base/test_tab_strip_model_observer.cc b/chrome/test/base/test_tab_strip_model_observer.cc
index dcb8196..87bb8c3 100644
--- a/chrome/test/base/test_tab_strip_model_observer.cc
+++ b/chrome/test/base/test_tab_strip_model_observer.cc
@@ -43,7 +43,7 @@ void TestTabStripModelObserver::ObservePrintPreviewTabContents(
tab_controller->GetPrintPreviewForTab(contents);
if (preview_tab) {
RegisterAsObserver(content::Source<NavigationController>(
- &preview_tab->tab_contents()->controller()));
+ &preview_tab->tab_contents()->GetController()));
}
}
}
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index ee65854..9459bd1 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -301,7 +301,7 @@ bool GetCurrentTabTitle(const Browser* browser, string16* title) {
TabContents* tab_contents = browser->GetSelectedTabContents();
if (!tab_contents)
return false;
- NavigationEntry* last_entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* last_entry = tab_contents->GetController().GetActiveEntry();
if (!last_entry)
return false;
title->assign(last_entry->GetTitleForDisplay(""));
@@ -335,7 +335,7 @@ void WaitForBrowserActionUpdated(ExtensionAction* browser_action) {
void WaitForLoadStop(TabContents* tab) {
WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
// In many cases, the load may have finished before we get here. Only wait if
// the tab still has a pending navigation.
if (!tab->IsLoading())
@@ -365,7 +365,7 @@ void OpenURLOffTheRecord(Profile* profile, const GURL& url) {
Browser::OpenURLOffTheRecord(profile, url);
Browser* browser = BrowserList::FindTabbedBrowser(
profile->GetOffTheRecordProfile(), false);
- WaitForNavigations(&browser->GetSelectedTabContents()->controller(), 1);
+ WaitForNavigations(&browser->GetSelectedTabContents()->GetController(), 1);
}
void NavigateToURL(browser::NavigateParams* params) {
@@ -398,7 +398,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
WaitForLoadStop(browser->GetSelectedTabContents());
TestNavigationObserver same_tab_observer(
content::Source<NavigationController>(
- &browser->GetSelectedTabContents()->controller()),
+ &browser->GetSelectedTabContents()->GetController()),
NULL,
number_of_navigations);
@@ -443,7 +443,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
base::Unretained(MessageLoopForUI::current())));
return;
} else if (tab_contents) {
- NavigationController* controller = &tab_contents->controller();
+ NavigationController* controller = &tab_contents->GetController();
WaitForNavigations(controller, number_of_navigations);
return;
}
@@ -922,7 +922,7 @@ TitleWatcher::TitleWatcher(TabContents* tab_contents,
notification_registrar_.Add(
this,
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab_contents->controller()));
+ content::Source<NavigationController>(&tab_contents->GetController()));
}
void TitleWatcher::AlsoWaitForTitle(const string16& expected_title) {
@@ -949,7 +949,7 @@ void TitleWatcher::Observe(int type,
} else if (type == content::NOTIFICATION_LOAD_STOP) {
NavigationController* controller =
content::Source<NavigationController>(source).ptr();
- ASSERT_EQ(&tab_contents_->controller(), controller);
+ ASSERT_EQ(&tab_contents_->GetController(), controller);
} else {
FAIL() << "Unexpected notification received.";
}