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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/public/test/render_view_test.h" 5 #include "content/public/test/render_view_test.h"
6 6
7 #include <cctype> 7 #include <cctype>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "components/scheduler/renderer/renderer_scheduler.h" 10 #include "components/scheduler/renderer/renderer_scheduler.h"
11 #include "content/common/dom_storage/dom_storage_types.h" 11 #include "content/common/dom_storage/dom_storage_types.h"
12 #include "content/common/frame_messages.h" 12 #include "content/common/frame_messages.h"
13 #include "content/common/input_messages.h" 13 #include "content/common/input_messages.h"
14 #include "content/common/view_messages.h" 14 #include "content/common/view_messages.h"
15 #include "content/public/browser/content_browser_client.h" 15 #include "content/public/browser/content_browser_client.h"
16 #include "content/public/browser/native_web_keyboard_event.h" 16 #include "content/public/browser/native_web_keyboard_event.h"
17 #include "content/public/common/content_client.h" 17 #include "content/public/common/content_client.h"
18 #include "content/public/common/content_switches.h"
18 #include "content/public/common/renderer_preferences.h" 19 #include "content/public/common/renderer_preferences.h"
19 #include "content/public/renderer/content_renderer_client.h" 20 #include "content/public/renderer/content_renderer_client.h"
20 #include "content/public/test/frame_load_waiter.h" 21 #include "content/public/test/frame_load_waiter.h"
21 #include "content/renderer/history_controller.h" 22 #include "content/renderer/history_controller.h"
22 #include "content/renderer/history_serialization.h" 23 #include "content/renderer/history_serialization.h"
23 #include "content/renderer/render_thread_impl.h" 24 #include "content/renderer/render_thread_impl.h"
24 #include "content/renderer/render_view_impl.h" 25 #include "content/renderer/render_view_impl.h"
25 #include "content/renderer/renderer_blink_platform_impl.h" 26 #include "content/renderer/renderer_blink_platform_impl.h"
26 #include "content/renderer/renderer_main_platform_delegate.h" 27 #include "content/renderer/renderer_main_platform_delegate.h"
27 #include "content/test/fake_compositor_dependencies.h" 28 #include "content/test/fake_compositor_dependencies.h"
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 FrameMsg_Navigate_Type::NORMAL, true, base::TimeTicks(), 539 FrameMsg_Navigate_Type::NORMAL, true, base::TimeTicks(),
539 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL()); 540 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL());
540 RequestNavigationParams request_params; 541 RequestNavigationParams request_params;
541 request_params.page_state = state; 542 request_params.page_state = state;
542 request_params.page_id = impl->page_id_ + offset; 543 request_params.page_id = impl->page_id_ + offset;
543 request_params.nav_entry_id = pending_offset + 1; 544 request_params.nav_entry_id = pending_offset + 1;
544 request_params.pending_history_list_offset = pending_offset; 545 request_params.pending_history_list_offset = pending_offset;
545 request_params.current_history_list_offset = impl->history_list_offset_; 546 request_params.current_history_list_offset = impl->history_list_offset_;
546 request_params.current_history_list_length = history_list_length; 547 request_params.current_history_list_length = history_list_length;
547 548
548 impl->GetMainRenderFrame()->OnNavigate(common_params, StartNavigationParams(), 549 // PlzNavigate
549 request_params); 550 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
551 switches::kEnableBrowserSideNavigation)) {
552 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
553 ResourceResponseHead(), common_params.url, common_params,
554 request_params);
555 } else {
556 impl->GetMainRenderFrame()->OnNavigate(
557 common_params, StartNavigationParams(), request_params);
558 }
550 559
551 // The load actually happens asynchronously, so we pump messages to process 560 // The load actually happens asynchronously, so we pump messages to process
552 // the pending continuation. 561 // the pending continuation.
553 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait(); 562 FrameLoadWaiter(view_->GetMainRenderFrame()).Wait();
554 } 563 }
555 564
556 } // namespace content 565 } // namespace content
OLDNEW
« 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