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

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

Issue 872473003: PlzNavigate: Remove the RequestNavigation IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nits + fix compilation error Created 5 years, 10 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 | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | 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 33d23ab550b07544f4e3e213fa11b20813c5cd84..6f692afdaadaa93e84debf83598870be7123318f 100644
--- a/content/browser/frame_host/navigator_impl_unittest.cc
+++ b/content/browser/frame_host/navigator_impl_unittest.cc
@@ -14,6 +14,7 @@
#include "content/browser/frame_host/render_frame_host_manager.h"
#include "content/browser/site_instance_impl.h"
#include "content/browser/streams/stream.h"
+#include "content/common/frame_messages.h"
#include "content/common/navigation_params.h"
#include "content/public/browser/stream_handle.h"
#include "content/public/common/content_switches.h"
@@ -148,7 +149,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, BeginNavigation) {
GetLoaderForNavigationRequest(subframe_request);
ASSERT_TRUE(subframe_request);
EXPECT_EQ(kUrl2, subframe_request->common_params().url);
- EXPECT_EQ(kUrl2, subframe_loader->common_params().url);
+ EXPECT_EQ(kUrl2, subframe_loader->request_info()->common_params.url);
// First party for cookies url should be that of the main frame.
EXPECT_EQ(kUrl1, subframe_loader->request_info()->first_party_for_cookies);
EXPECT_FALSE(subframe_loader->request_info()->is_main_frame);
@@ -174,7 +175,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, BeginNavigation) {
GetLoaderForNavigationRequest(main_request);
ASSERT_TRUE(main_request);
EXPECT_EQ(kUrl3, main_request->common_params().url);
- EXPECT_EQ(kUrl3, main_loader->common_params().url);
+ EXPECT_EQ(kUrl3, main_loader->request_info()->common_params.url);
EXPECT_EQ(kUrl3, main_loader->request_info()->first_party_for_cookies);
EXPECT_TRUE(main_loader->request_info()->is_main_frame);
EXPECT_FALSE(main_loader->request_info()->parent_is_main_frame);
@@ -453,13 +454,13 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, Reload) {
SendRequestNavigationWithParameters(
node, kUrl, Referrer(), ui::PAGE_TRANSITION_LINK,
NavigationController::RELOAD);
- main_test_rfh()->SendBeginNavigationWithURL(kUrl);
// A NavigationRequest should have been generated.
NavigationRequest* main_request =
GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(main_request != NULL);
EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD,
main_request->common_params().navigation_type);
+ main_test_rfh()->PrepareForCommit(kUrl);
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
main_test_rfh()->SendNavigate(0, kUrl);
@@ -469,12 +470,12 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, Reload) {
SendRequestNavigationWithParameters(
node, kUrl, Referrer(), ui::PAGE_TRANSITION_LINK,
NavigationController::RELOAD_IGNORING_CACHE);
- main_test_rfh()->SendBeginNavigationWithURL(kUrl);
// A NavigationRequest should have been generated.
main_request = GetNavigationRequestForFrameTreeNode(node);
ASSERT_TRUE(main_request != NULL);
EXPECT_EQ(FrameMsg_Navigate_Type::RELOAD_IGNORING_CACHE,
main_request->common_params().navigation_type);
+ main_test_rfh()->PrepareForCommit(kUrl);
EXPECT_FALSE(GetSpeculativeRenderFrameHost(node));
}
« no previous file with comments | « content/browser/frame_host/navigator_impl.cc ('k') | content/browser/frame_host/render_frame_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698