Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2456)

Unified Diff: chrome/browser/tab_contents/navigation_controller_unittest.cc

Issue 6336012: Get rid of RenderViewHostDelegate::BrowserIntegration since it was unnecessar... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/navigation_controller_unittest.cc
===================================================================
--- chrome/browser/tab_contents/navigation_controller_unittest.cc (revision 72247)
+++ chrome/browser/tab_contents/navigation_controller_unittest.cc (working copy)
@@ -31,8 +31,6 @@
using base::Time;
-namespace {
-
// NavigationControllerTest ----------------------------------------------------
class NavigationControllerTest : public RenderViewHostTestHarness {
@@ -1824,14 +1822,9 @@
controller().GoBack();
contents()->CommitPendingNavigation();
- // Casts the TabContents to a RenderViewHostDelegate::BrowserIntegration so we
- // can call GoToEntryAtOffset which is private.
- RenderViewHostDelegate::BrowserIntegration* rvh_delegate =
- static_cast<RenderViewHostDelegate::BrowserIntegration*>(contents());
-
// Simulate the page calling history.back(), it should not create a pending
// entry.
- rvh_delegate->GoToEntryAtOffset(-1);
+ contents()->OnGoToEntryAtOffset(-1);
EXPECT_EQ(-1, controller().pending_entry_index());
// The actual cross-navigation is suspended until the current RVH tells us
// it unloaded, simulate that.
@@ -1846,7 +1839,7 @@
process()->sink().ClearMessages();
// Now test history.forward()
- rvh_delegate->GoToEntryAtOffset(1);
+ contents()->OnGoToEntryAtOffset(1);
EXPECT_EQ(-1, controller().pending_entry_index());
// The actual cross-navigation is suspended until the current RVH tells us
// it unloaded, simulate that.
@@ -1858,7 +1851,7 @@
process()->sink().ClearMessages();
// Make sure an extravagant history.go() doesn't break.
- rvh_delegate->GoToEntryAtOffset(120); // Out of bounds.
+ contents()->OnGoToEntryAtOffset(120); // Out of bounds.
EXPECT_EQ(-1, controller().pending_entry_index());
message = process()->sink().GetFirstMessageMatching(ViewMsg_Navigate::ID);
EXPECT_TRUE(message == NULL);
@@ -2030,5 +2023,3 @@
windows_[0]->tabs[0]->navigations[1]);
}
*/
-
-} // namespace

Powered by Google App Engine
This is Rietveld 408576698