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

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

Issue 1976573002: Only use pending navigation params for browser-initiated navigations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: consistency 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/public/test/render_view_test.h ('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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 657
658 base::MessageLoop::current()->RunUntilIdle(); 658 base::MessageLoop::current()->RunUntilIdle();
659 } 659 }
660 660
661 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) { 661 bool RenderViewTest::OnMessageReceived(const IPC::Message& msg) {
662 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 662 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
663 return impl->OnMessageReceived(msg); 663 return impl->OnMessageReceived(msg);
664 } 664 }
665 665
666 void RenderViewTest::DidNavigateWithinPage(blink::WebLocalFrame* frame, 666 void RenderViewTest::DidNavigateWithinPage(blink::WebLocalFrame* frame,
667 bool is_new_navigation) { 667 bool is_new_navigation,
668 bool content_initiated) {
668 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 669 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
669 blink::WebHistoryItem item; 670 blink::WebHistoryItem item;
670 item.initialize(); 671 item.initialize();
671 impl->GetMainRenderFrame()->didNavigateWithinPage( 672 impl->GetMainRenderFrame()->didNavigateWithinPage(
672 frame, 673 frame, item, is_new_navigation ? blink::WebStandardCommit
673 item, 674 : blink::WebHistoryInertCommit,
674 is_new_navigation ? blink::WebStandardCommit 675 content_initiated);
675 : blink::WebHistoryInertCommit);
676 } 676 }
677 677
678 blink::WebWidget* RenderViewTest::GetWebWidget() { 678 blink::WebWidget* RenderViewTest::GetWebWidget() {
679 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_); 679 RenderViewImpl* impl = static_cast<RenderViewImpl*>(view_);
680 return impl->webwidget(); 680 return impl->webwidget();
681 } 681 }
682 682
683 683
684 ContentClient* RenderViewTest::CreateContentClient() { 684 ContentClient* RenderViewTest::CreateContentClient() {
685 return new TestContentClient; 685 return new TestContentClient;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/public/test/render_view_test.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698