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

Side by Side Diff: content/public/test/render_view_test.cc

Issue 1999943002: Moving HTTP POST body from StartNavigationParams to CommonNavigationParams. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed CR feedback from clamy@. Created 4 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
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <cctype> 9 #include <cctype>
10 10
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 void RenderViewTest::SetFocused(const blink::WebNode& node) { 572 void RenderViewTest::SetFocused(const blink::WebNode& node) {
573 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 573 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
574 impl->focusedNodeChanged(blink::WebNode(), node); 574 impl->focusedNodeChanged(blink::WebNode(), node);
575 } 575 }
576 576
577 void RenderViewTest::Reload(const GURL& url) { 577 void RenderViewTest::Reload(const GURL& url) {
578 CommonNavigationParams common_params( 578 CommonNavigationParams common_params(
579 url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::RELOAD, 579 url, Referrer(), ui::PAGE_TRANSITION_LINK, FrameMsg_Navigate_Type::RELOAD,
580 true, false, base::TimeTicks(), 580 true, false, base::TimeTicks(),
581 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), 581 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(),
582 LOFI_UNSPECIFIED, base::TimeTicks::Now(), "GET"); 582 LOFI_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr);
583 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 583 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
584 TestRenderFrame* frame = 584 TestRenderFrame* frame =
585 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 585 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
586 frame->Navigate(common_params, StartNavigationParams(), 586 frame->Navigate(common_params, StartNavigationParams(),
587 RequestNavigationParams()); 587 RequestNavigationParams());
588 FrameLoadWaiter(frame).Wait(); 588 FrameLoadWaiter(frame).Wait();
589 view_->GetWebView()->updateAllLifecyclePhases(); 589 view_->GetWebView()->updateAllLifecyclePhases();
590 } 590 }
591 591
592 uint32_t RenderViewTest::GetNavigationIPCType() { 592 uint32_t RenderViewTest::GetNavigationIPCType() {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 703 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
704 704
705 int history_list_length = impl->historyBackListCount() + 705 int history_list_length = impl->historyBackListCount() +
706 impl->historyForwardListCount() + 1; 706 impl->historyForwardListCount() + 1;
707 int pending_offset = offset + impl->history_list_offset_; 707 int pending_offset = offset + impl->history_list_offset_;
708 708
709 CommonNavigationParams common_params( 709 CommonNavigationParams common_params(
710 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK, 710 url, Referrer(), ui::PAGE_TRANSITION_FORWARD_BACK,
711 FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(), 711 FrameMsg_Navigate_Type::NORMAL, true, false, base::TimeTicks(),
712 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(), 712 FrameMsg_UILoadMetricsReportType::NO_REPORT, GURL(), GURL(),
713 LOFI_UNSPECIFIED, base::TimeTicks::Now(), "GET"); 713 LOFI_UNSPECIFIED, base::TimeTicks::Now(), "GET", nullptr);
714 RequestNavigationParams request_params; 714 RequestNavigationParams request_params;
715 request_params.page_state = state; 715 request_params.page_state = state;
716 request_params.page_id = impl->page_id_ + offset; 716 request_params.page_id = impl->page_id_ + offset;
717 request_params.nav_entry_id = pending_offset + 1; 717 request_params.nav_entry_id = pending_offset + 1;
718 request_params.pending_history_list_offset = pending_offset; 718 request_params.pending_history_list_offset = pending_offset;
719 request_params.current_history_list_offset = impl->history_list_offset_; 719 request_params.current_history_list_offset = impl->history_list_offset_;
720 request_params.current_history_list_length = history_list_length; 720 request_params.current_history_list_length = history_list_length;
721 721
722 TestRenderFrame* frame = 722 TestRenderFrame* frame =
723 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame()); 723 static_cast<TestRenderFrame*>(impl->GetMainRenderFrame());
724 frame->Navigate(common_params, StartNavigationParams(), request_params); 724 frame->Navigate(common_params, StartNavigationParams(), request_params);
725 725
726 // The load actually happens asynchronously, so we pump messages to process 726 // The load actually happens asynchronously, so we pump messages to process
727 // the pending continuation. 727 // the pending continuation.
728 FrameLoadWaiter(frame).Wait(); 728 FrameLoadWaiter(frame).Wait();
729 view_->GetWebView()->updateAllLifecyclePhases(); 729 view_->GetWebView()->updateAllLifecyclePhases();
730 } 730 }
731 731
732 } // namespace content 732 } // namespace content
OLDNEW
« no previous file with comments | « content/common/navigation_params.cc ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698