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

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

Issue 1010243002: PlzNavigate: Properly set the pending entry in the NavigatorImpl unit test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simpler Created 5 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/navigator_impl_unittest.cc
diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
index d5b9da663184bb623d161a1f03a422a56ba09fd9..03112e00020870d5980255ab35b3aff59a7c87a3 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -48,27 +48,20 @@ class NavigatorTestWithBrowserSideNavigation
void RequestNavigation(FrameTreeNode* node, const GURL& url) {
RequestNavigationWithParameters(node, url, Referrer(),
- ui::PAGE_TRANSITION_LINK,
- NavigationController::NO_RELOAD);
+ ui::PAGE_TRANSITION_LINK);
}
void RequestNavigationWithParameters(
FrameTreeNode* node,
const GURL& url,
const Referrer& referrer,
- ui::PageTransition transition_type,
- NavigationController::ReloadType reload_type) {
- scoped_ptr<NavigationEntryImpl> entry(
- NavigationEntryImpl::FromNavigationEntry(
- NavigationController::CreateNavigationEntry(
- url,
- referrer,
- transition_type,
- false,
- std::string(),
- controller().GetBrowserContext())));
- static_cast<NavigatorImpl*>(node->navigator())->RequestNavigation(
- node, *entry, reload_type, base::TimeTicks::Now());
+ ui::PageTransition transition_type) {
+ NavigationController::LoadURLParams load_params(url);
+ load_params.frame_tree_node_id = node->frame_tree_node_id();
+ load_params.referrer = referrer;
+ load_params.transition_type = transition_type;
+
+ controller().LoadURLWithParams(load_params);
}
NavigationRequest* GetNavigationRequestForFrameTreeNode(
@@ -772,9 +765,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, Reload) {
contents()->NavigateAndCommit(kUrl);
FrameTreeNode* node = main_test_rfh()->frame_tree_node();
- RequestNavigationWithParameters(node, kUrl, Referrer(),
- ui::PAGE_TRANSITION_LINK,
- NavigationController::RELOAD);
+ controller().Reload(false);
// A NavigationRequest should have been generated.
NavigationRequest* main_request = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(main_request != NULL);
@@ -787,9 +778,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, Reload) {
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
// Now do a shift+reload.
- RequestNavigationWithParameters(node, kUrl, Referrer(),
- ui::PAGE_TRANSITION_LINK,
- NavigationController::RELOAD_IGNORING_CACHE);
+ controller().ReloadIgnoringCache(false);
Avi (use Gerrit) 2015/03/19 14:51:16 Note that ReloadType isn't a part of LoadURLParams
clamy 2015/03/19 16:34:52 Acknowledged.
// A NavigationRequest should have been generated.
main_request = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(main_request != NULL);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698