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

Unified Diff: content/public/test/render_view_test.cc

Issue 1157863005: Use WebFrame::loadRequest for reloads and history navigations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | content/renderer/history_controller.h » ('j') | content/renderer/history_controller.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/render_view_test.cc
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index e6925e26a1a65f6709cc2ef043a410f2e69fed01..4cc0531ee00bbdb880f6b26425b6b0e80b28ab6d 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -15,6 +15,7 @@
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/native_web_keyboard_event.h"
#include "content/public/common/content_client.h"
+#include "content/public/common/content_switches.h"
#include "content/public/common/renderer_preferences.h"
#include "content/public/renderer/content_renderer_client.h"
#include "content/public/test/frame_load_waiter.h"
@@ -545,8 +546,16 @@ void RenderViewTest::GoToOffset(int offset, const PageState& state) {
request_params.current_history_list_offset = impl->history_list_offset_;
request_params.current_history_list_length = history_list_length;
- impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(),
- request_params);
+ // PlzNavigate
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableBrowserSideNavigation)) {
+ impl->GetMainRenderFrame()->OnCommitNavigation(
Charlie Reis 2015/05/27 23:34:35 This feels strange to pass both common_params.url
clamy 2015/05/29 14:47:01 Yes. This was testing code that I removed in the l
+ ResourceResponseHead(), common_params.url, common_params,
+ request_params);
+ } else {
+ impl->GetMainRenderFrame()->OnNavigate(
+ common_params, StartNavigationParams(), request_params);
+ }
// The load actually happens asynchronously, so we pump messages to process
// the pending continuation.
« no previous file with comments | « no previous file | content/renderer/history_controller.h » ('j') | content/renderer/history_controller.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698