summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_commands_unittest.cc
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 17:36:30 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 17:36:30 +0000
commit10b833ebf1528dbfd186018c66961956bd2a9e39 (patch)
treefcf3bd5c31c45e7472ae8c4445a796990693be49 /chrome/browser/browser_commands_unittest.cc
parent2b833518315d574e12ec8120785116da2d0bf993 (diff)
downloadchromium_src-10b833ebf1528dbfd186018c66961956bd2a9e39.zip
chromium_src-10b833ebf1528dbfd186018c66961956bd2a9e39.tar.gz
chromium_src-10b833ebf1528dbfd186018c66961956bd2a9e39.tar.bz2
Revert r115276, it broke PanelDownloadTest.Download in interactive_ui_tests
on win,linux,mac. Original change: Rename TabContents::controller() to GetController and put it into the WebContents namespace. BUG=98716 TBR=dpranke Review URL: http://codereview.chromium.org/8956050 TBR=jam Review URL: http://codereview.chromium.org/9018016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115346 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_commands_unittest.cc')
-rw-r--r--chrome/browser/browser_commands_unittest.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/chrome/browser/browser_commands_unittest.cc b/chrome/browser/browser_commands_unittest.cc
index 4554170..7cf1872 100644
--- a/chrome/browser/browser_commands_unittest.cc
+++ b/chrome/browser/browser_commands_unittest.cc
@@ -70,7 +70,7 @@ TEST_F(BrowserCommandsTest, DuplicateTab) {
// Verify the stack of urls.
NavigationController& controller =
- browser()->GetTabContentsAt(1)->GetController();
+ browser()->GetTabContentsAt(1)->controller();
ASSERT_EQ(3, controller.entry_count());
ASSERT_EQ(2, controller.GetCurrentEntryIndex());
ASSERT_TRUE(url1 == controller.GetEntryAtIndex(0)->url());
@@ -118,14 +118,14 @@ TEST_F(BrowserCommandsTest, BackForwardInNewTab) {
// The original tab should be unchanged.
TabContents* zeroth = browser()->GetTabContentsAt(0);
EXPECT_EQ(url2, zeroth->GetURL());
- EXPECT_TRUE(zeroth->GetController().CanGoBack());
- EXPECT_FALSE(zeroth->GetController().CanGoForward());
+ EXPECT_TRUE(zeroth->controller().CanGoBack());
+ EXPECT_FALSE(zeroth->controller().CanGoForward());
// The new tab should be like the first one but navigated back.
TabContents* first = browser()->GetTabContentsAt(1);
EXPECT_EQ(url1, browser()->GetTabContentsAt(1)->GetURL());
- EXPECT_FALSE(first->GetController().CanGoBack());
- EXPECT_TRUE(first->GetController().CanGoForward());
+ EXPECT_FALSE(first->controller().CanGoBack());
+ EXPECT_TRUE(first->controller().CanGoForward());
// Select the second tab and make it go forward in a new background tab.
browser()->ActivateTabAt(1, true);
@@ -133,35 +133,35 @@ TEST_F(BrowserCommandsTest, BackForwardInNewTab) {
// but because of this bug, it will assert later if we don't. When the bug is
// fixed, one of the three commits here related to this bug should be removed
// (to test both codepaths).
- CommitPendingLoad(&first->GetController());
+ CommitPendingLoad(&first->controller());
EXPECT_EQ(1, browser()->active_index());
browser()->GoForward(NEW_BACKGROUND_TAB);
// The previous tab should be unchanged and still in the foreground.
EXPECT_EQ(url1, first->GetURL());
- EXPECT_FALSE(first->GetController().CanGoBack());
- EXPECT_TRUE(first->GetController().CanGoForward());
+ EXPECT_FALSE(first->controller().CanGoBack());
+ EXPECT_TRUE(first->controller().CanGoForward());
EXPECT_EQ(1, browser()->active_index());
// There should be a new tab navigated forward.
ASSERT_EQ(3, browser()->tab_count());
TabContents* second = browser()->GetTabContentsAt(2);
EXPECT_EQ(url2, second->GetURL());
- EXPECT_TRUE(second->GetController().CanGoBack());
- EXPECT_FALSE(second->GetController().CanGoForward());
+ EXPECT_TRUE(second->controller().CanGoBack());
+ EXPECT_FALSE(second->controller().CanGoForward());
// Now do back in a new foreground tab. Don't bother re-checking every sngle
// thing above, just validate that it's opening properly.
browser()->ActivateTabAt(2, true);
// TODO(brettw) bug 11055: see the comment above about why we need this.
- CommitPendingLoad(&second->GetController());
+ CommitPendingLoad(&second->controller());
browser()->GoBack(NEW_FOREGROUND_TAB);
ASSERT_EQ(3, browser()->active_index());
ASSERT_EQ(url1, browser()->GetSelectedTabContents()->GetURL());
// Same thing again for forward.
// TODO(brettw) bug 11055: see the comment above about why we need this.
- CommitPendingLoad(&browser()->GetSelectedTabContents()->GetController());
+ CommitPendingLoad(&browser()->GetSelectedTabContents()->controller());
browser()->GoForward(NEW_FOREGROUND_TAB);
ASSERT_EQ(4, browser()->active_index());
ASSERT_EQ(url2, browser()->GetSelectedTabContents()->GetURL());