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

Side by Side Diff: content/test/test_render_frame_host.cc

Issue 358973005: Navigation transitions: Pass is_transition_navigation flag up to the embedder (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fix Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/shell/renderer/test_runner/web_test_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/test_render_frame_host.h" 5 #include "content/test/test_render_frame_host.h"
6 6
7 #include "content/browser/frame_host/frame_tree.h" 7 #include "content/browser/frame_host/frame_tree.h"
8 #include "content/browser/frame_host/render_frame_host_delegate.h" 8 #include "content/browser/frame_host/render_frame_host_delegate.h"
9 #include "content/common/frame_messages.h" 9 #include "content/common/frame_messages.h"
10 #include "content/public/common/page_transition_types.h" 10 #include "content/public/common/page_transition_types.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 page_id, url, PAGE_TRANSITION_RELOAD, 500); 73 page_id, url, PAGE_TRANSITION_RELOAD, 500);
74 } 74 }
75 75
76 void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode( 76 void TestRenderFrameHost::SendNavigateWithTransitionAndResponseCode(
77 int page_id, 77 int page_id,
78 const GURL& url, PageTransition transition, 78 const GURL& url, PageTransition transition,
79 int response_code) { 79 int response_code) {
80 // DidStartProvisionalLoad may delete the pending entry that holds |url|, 80 // DidStartProvisionalLoad may delete the pending entry that holds |url|,
81 // so we keep a copy of it to use in SendNavigateWithParameters. 81 // so we keep a copy of it to use in SendNavigateWithParameters.
82 GURL url_copy(url); 82 GURL url_copy(url);
83 OnDidStartProvisionalLoadForFrame(url_copy); 83 OnDidStartProvisionalLoadForFrame(url_copy, false);
84 SendNavigateWithParameters(page_id, url_copy, transition, url_copy, 84 SendNavigateWithParameters(page_id, url_copy, transition, url_copy,
85 response_code, 0, std::vector<GURL>()); 85 response_code, 0, std::vector<GURL>());
86 } 86 }
87 87
88 void TestRenderFrameHost::SendNavigateWithOriginalRequestURL( 88 void TestRenderFrameHost::SendNavigateWithOriginalRequestURL(
89 int page_id, 89 int page_id,
90 const GURL& url, 90 const GURL& url,
91 const GURL& original_request_url) { 91 const GURL& original_request_url) {
92 OnDidStartProvisionalLoadForFrame(url); 92 OnDidStartProvisionalLoadForFrame(url, false);
93 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, 93 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK,
94 original_request_url, 200, 0, std::vector<GURL>()); 94 original_request_url, 200, 0, std::vector<GURL>());
95 } 95 }
96 96
97 void TestRenderFrameHost::SendNavigateWithFile( 97 void TestRenderFrameHost::SendNavigateWithFile(
98 int page_id, 98 int page_id,
99 const GURL& url, 99 const GURL& url,
100 const base::FilePath& file_path) { 100 const base::FilePath& file_path) {
101 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, url, 200, 101 SendNavigateWithParameters(page_id, url, PAGE_TRANSITION_LINK, url, 200,
102 &file_path, std::vector<GURL>()); 102 &file_path, std::vector<GURL>());
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 params.load_flags = net::LOAD_NORMAL | net::LOAD_ENABLE_LOAD_TIMING; 168 params.load_flags = net::LOAD_NORMAL | net::LOAD_ENABLE_LOAD_TIMING;
169 params.has_user_gesture = false; 169 params.has_user_gesture = false;
170 params.transition_type = PAGE_TRANSITION_LINK; 170 params.transition_type = PAGE_TRANSITION_LINK;
171 params.should_replace_current_entry = false; 171 params.should_replace_current_entry = false;
172 params.allow_download = true; 172 params.allow_download = true;
173 // TODO(clamy): When the BeginNavigation handler is no longer compiled out, 173 // TODO(clamy): When the BeginNavigation handler is no longer compiled out,
174 // call OnBeginNavigation directly. 174 // call OnBeginNavigation directly.
175 frame_tree_node()->render_manager()->OnBeginNavigation(params); 175 frame_tree_node()->render_manager()->OnBeginNavigation(params);
176 } 176 }
177 } // namespace content 177 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/web_test_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698