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

Unified Diff: content/browser/frame_host/navigation_controller_impl_unittest.cc

Issue 636673002: Remove navigation from TestRenderViewHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes from self-review Created 6 years, 2 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: content/browser/frame_host/navigation_controller_impl_unittest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_unittest.cc b/content/browser/frame_host/navigation_controller_impl_unittest.cc
index bb876c50d058dd12921987fa498a8383cac5fa71..638b265c9d134063f09ab467d4b52eb2ef41c439 100644
--- a/content/browser/frame_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_unittest.cc
@@ -826,7 +826,7 @@ TEST_F(NavigationControllerTest, LoadURL_PrivilegedPending) {
controller.LoadURL(
kExistingURL1, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string());
// Pretend it has bindings so we can tell if we incorrectly copy it.
- test_rvh()->AllowBindings(2);
+ main_test_rfh()->GetRenderViewHost()->AllowBindings(2);
main_test_rfh()->SendNavigate(0, kExistingURL1);
EXPECT_EQ(1U, navigation_entry_committed_counter_);
navigation_entry_committed_counter_ = 0;
@@ -4246,7 +4246,7 @@ TEST_F(NavigationControllerTest, MAYBE_PurgeScreenshot) {
TEST_F(NavigationControllerTest, PushStateUpdatesTitleAndFavicon) {
// Navigate.
- test_rvh()->SendNavigate(1, GURL("http://foo"));
+ contents()->GetMainFrame()->SendNavigate(1, GURL("http://foo"));
Charlie Reis 2014/10/08 17:41:55 Again, why choose this over main_rfh() in some pla
ncarter (slow) 2014/10/08 22:39:28 Discussed in previous comment.
// Set title and favicon.
base::string16 title(base::ASCIIToUTF16("Title"));
@@ -4263,7 +4263,7 @@ TEST_F(NavigationControllerTest, PushStateUpdatesTitleAndFavicon) {
params.url = url;
params.page_state = PageState::CreateFromURL(url);
params.was_within_same_page = true;
- test_rvh()->SendNavigateWithParams(&params);
+ contents()->GetMainFrame()->SendNavigateWithParams(&params);
// The title should immediately be visible on the new NavigationEntry.
base::string16 new_title =

Powered by Google App Engine
This is Rietveld 408576698