summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_commands_unittest.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 22:35:56 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 22:35:56 +0000
commitf5fa20e471b2fc9bb18f6f673146704483d0b18e (patch)
tree0fc2253432ce98c202ae00afdea927f5bda22730 /chrome/browser/browser_commands_unittest.cc
parentec55bd7353cbae29541cc348869319104e7349f4 (diff)
downloadchromium_src-f5fa20e471b2fc9bb18f6f673146704483d0b18e.zip
chromium_src-f5fa20e471b2fc9bb18f6f673146704483d0b18e.tar.gz
chromium_src-f5fa20e471b2fc9bb18f6f673146704483d0b18e.tar.bz2
Revert 115346. The change didn't break anything, the test was faulty. Will disable in a followup. - 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 TBR=thakis@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115428 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 7cf1872..4554170 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)->controller();
+ browser()->GetTabContentsAt(1)->GetController();
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->controller().CanGoBack());
- EXPECT_FALSE(zeroth->controller().CanGoForward());
+ EXPECT_TRUE(zeroth->GetController().CanGoBack());
+ EXPECT_FALSE(zeroth->GetController().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->controller().CanGoBack());
- EXPECT_TRUE(first->controller().CanGoForward());
+ EXPECT_FALSE(first->GetController().CanGoBack());
+ EXPECT_TRUE(first->GetController().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->controller());
+ CommitPendingLoad(&first->GetController());
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->controller().CanGoBack());
- EXPECT_TRUE(first->controller().CanGoForward());
+ EXPECT_FALSE(first->GetController().CanGoBack());
+ EXPECT_TRUE(first->GetController().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->controller().CanGoBack());
- EXPECT_FALSE(second->controller().CanGoForward());
+ EXPECT_TRUE(second->GetController().CanGoBack());
+ EXPECT_FALSE(second->GetController().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->controller());
+ CommitPendingLoad(&second->GetController());
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()->controller());
+ CommitPendingLoad(&browser()->GetSelectedTabContents()->GetController());
browser()->GoForward(NEW_FOREGROUND_TAB);
ASSERT_EQ(4, browser()->active_index());
ASSERT_EQ(url2, browser()->GetSelectedTabContents()->GetURL());