summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_navigator_browsertest.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 16:17:49 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-18 16:17:49 +0000
commit3c9e187bd8ec34ebf2a91a37c868584c465647e8 (patch)
tree84c9540d220fa155cf2af8c944638c0719dee670 /chrome/browser/ui/browser_navigator_browsertest.cc
parent3e35b224fd0c36f17f432f23e2eb3729667210b1 (diff)
downloadchromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.zip
chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.tar.gz
chromium_src-3c9e187bd8ec34ebf2a91a37c868584c465647e8.tar.bz2
Make pink's TabContentsWrapper change compile on Windows.
Code by pinkerton@, with modifications by evanm and myself to get it to build on windows/linux/chromeos. BUG=none TEST=none Review URL: http://codereview.chromium.org/4694008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_navigator_browsertest.cc')
-rw-r--r--chrome/browser/ui/browser_navigator_browsertest.cc26
1 files changed, 14 insertions, 12 deletions
diff --git a/chrome/browser/ui/browser_navigator_browsertest.cc b/chrome/browser/ui/browser_navigator_browsertest.cc
index 7bad301..dc9d661 100644
--- a/chrome/browser/ui/browser_navigator_browsertest.cc
+++ b/chrome/browser/ui/browser_navigator_browsertest.cc
@@ -6,6 +6,7 @@
#include "chrome/browser/profile.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_view.h"
+#include "chrome/browser/tab_contents_wrapper.h"
#include "chrome/browser/tabs/tab_strip_model.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
@@ -40,12 +41,13 @@ class BrowserNavigatorTest : public InProcessBrowserTest {
return browser;
}
- TabContents* CreateTabContents() {
- return new TabContents(browser()->profile(),
- NULL,
- MSG_ROUTING_NONE,
- browser()->GetSelectedTabContents(),
- NULL);
+ TabContentsWrapper* CreateTabContents() {
+ return Browser::TabContentsFactory(
+ browser()->profile(),
+ NULL,
+ MSG_ROUTING_NONE,
+ browser()->GetSelectedTabContents(),
+ NULL);
}
void RunSuppressTest(WindowOpenDisposition disposition) {
@@ -131,7 +133,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Disposition_NewForegroundTab) {
p.disposition = NEW_FOREGROUND_TAB;
browser::Navigate(&p);
EXPECT_NE(old_contents, browser()->GetSelectedTabContents());
- EXPECT_EQ(browser()->GetSelectedTabContents(), p.target_contents);
+ EXPECT_EQ(browser()->GetSelectedTabContentsWrapper(), p.target_contents);
EXPECT_EQ(2, browser()->tab_count());
}
@@ -347,7 +349,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, TargetContents_ForegroundTab) {
// Navigate() should have opened the contents in a new foreground in the
// current Browser.
EXPECT_EQ(browser(), p.browser);
- EXPECT_EQ(browser()->GetSelectedTabContents(), p.target_contents);
+ EXPECT_EQ(browser()->GetSelectedTabContentsWrapper(), p.target_contents);
// We should have one window, with two tabs.
EXPECT_EQ(1u, BrowserList::size());
@@ -382,7 +384,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, TargetContents_Popup) {
// All platforms should respect size however provided width > 400 (Mac has a
// minimum window width of 400).
EXPECT_EQ(p.window_bounds.size(),
- p.target_contents->view()->GetContainerSize());
+ p.target_contents->tab_contents()->view()->GetContainerSize());
// We should have two windows, the new popup and the browser() provided by the
// framework.
@@ -407,7 +409,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, Tabstrip_InsertAtIndex) {
// Navigate() should have inserted a new tab at slot 0 in the tabstrip.
EXPECT_EQ(browser(), p.browser);
EXPECT_EQ(0, browser()->tabstrip_model()->GetIndexOfTabContents(
- static_cast<const TabContents*>(p.target_contents)));
+ static_cast<const TabContentsWrapper*>(p.target_contents)));
// We should have one window - the browser() provided by the framework.
EXPECT_EQ(1u, BrowserList::size());
@@ -428,7 +430,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, NullBrowser_NewForegroundTab) {
// Navigate() should have found browser() and create a new tab.
EXPECT_EQ(browser(), p.browser);
EXPECT_NE(old_contents, browser()->GetSelectedTabContents());
- EXPECT_EQ(browser()->GetSelectedTabContents(), p.target_contents);
+ EXPECT_EQ(browser()->GetSelectedTabContentsWrapper(), p.target_contents);
EXPECT_EQ(2, browser()->tab_count());
}
@@ -447,7 +449,7 @@ IN_PROC_BROWSER_TEST_F(BrowserNavigatorTest, NullBrowser_MatchProfile) {
// Navigate() should have found incognito, not browser().
EXPECT_EQ(incognito, p.browser);
- EXPECT_EQ(incognito->GetSelectedTabContents(), p.target_contents);
+ EXPECT_EQ(incognito->GetSelectedTabContentsWrapper(), p.target_contents);
EXPECT_EQ(1, incognito->tab_count());
}