diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 18:06:55 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-06 18:06:55 +0000 |
commit | 5a06a156e8a396e90dd0dc503d989bc90fe1ad02 (patch) | |
tree | 315c48d2adc3d09c8843dfdb0e1d8a00f5c2cc8f /content/browser/tab_contents/tab_contents_unittest.cc | |
parent | 55f160404eedf673b514f5bbe3d82ac9eec372c1 (diff) | |
download | chromium_src-5a06a156e8a396e90dd0dc503d989bc90fe1ad02.zip chromium_src-5a06a156e8a396e90dd0dc503d989bc90fe1ad02.tar.gz chromium_src-5a06a156e8a396e90dd0dc503d989bc90fe1ad02.tar.bz2 |
Remove a few trivial tab_contents.h includes in chrome that I missed earlier.
I've switched RenderViewHostTestHarness::controller() to return the interface instead of the concrete class. Only two tests needed NavigationControllerImpl, so it's much easier to switch those to cast, and to leave the interface object as the return value as many tests in chrome use it and RVHTH will have to be exposed to chrome.
BUG=98716
Review URL: http://codereview.chromium.org/9123002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116681 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/tab_contents/tab_contents_unittest.cc')
-rw-r--r-- | content/browser/tab_contents/tab_contents_unittest.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/content/browser/tab_contents/tab_contents_unittest.cc b/content/browser/tab_contents/tab_contents_unittest.cc index 0f6d1e1..e10b651 100644 --- a/content/browser/tab_contents/tab_contents_unittest.cc +++ b/content/browser/tab_contents/tab_contents_unittest.cc @@ -234,12 +234,14 @@ class TabContentsTest : public RenderViewHostTestHarness { // Test to make sure that title updates get stripped of whitespace. TEST_F(TabContentsTest, UpdateTitle) { + NavigationControllerImpl& cont = + static_cast<NavigationControllerImpl&>(controller()); ViewHostMsg_FrameNavigate_Params params; InitNavigateParams(¶ms, 0, GURL(chrome::kAboutBlankURL), content::PAGE_TRANSITION_TYPED); content::LoadCommittedDetails details; - controller().RendererDidNavigate(params, &details); + cont.RendererDidNavigate(params, &details); contents()->UpdateTitle(rvh(), 0, ASCIIToUTF16(" Lots O' Whitespace\n"), base::i18n::LEFT_TO_RIGHT); @@ -248,12 +250,14 @@ TEST_F(TabContentsTest, UpdateTitle) { // Test view source mode for a webui page. TEST_F(TabContentsTest, NTPViewSource) { + NavigationControllerImpl& cont = + static_cast<NavigationControllerImpl&>(controller()); const char kUrl[] = "view-source:tabcontentstest://blah"; const GURL kGURL(kUrl); process()->sink().ClearMessages(); - controller().LoadURL( + cont.LoadURL( kGURL, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string()); rvh()->delegate()->RenderViewCreated(rvh()); @@ -264,7 +268,7 @@ TEST_F(TabContentsTest, NTPViewSource) { ViewHostMsg_FrameNavigate_Params params; InitNavigateParams(¶ms, 0, kGURL, content::PAGE_TRANSITION_TYPED); content::LoadCommittedDetails details; - controller().RendererDidNavigate(params, &details); + cont.RendererDidNavigate(params, &details); // Also check title and url. EXPECT_EQ(ASCIIToUTF16(kUrl), contents()->GetTitle()); } |