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

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

Issue 101573003: Add the navigation redirect-chain to Sync sessions proto for offline analysis. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Brett's comment on patch set 46, and rebase. Created 6 years, 8 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/common/page_transition_types.cc ('k') | content/test/test_render_frame_host.cc » ('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 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 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 5 #ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 6 #define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
7 7
8 #include <vector>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 #include "content/browser/frame_host/render_frame_host_impl.h" 11 #include "content/browser/frame_host/render_frame_host_impl.h"
10 #include "content/public/common/page_transition_types.h" 12 #include "content/public/common/page_transition_types.h"
11 13
12 struct FrameHostMsg_DidCommitProvisionalLoad_Params; 14 struct FrameHostMsg_DidCommitProvisionalLoad_Params;
13 15
14 namespace content { 16 namespace content {
15 17
16 class TestRenderFrameHost : public RenderFrameHostImpl { 18 class TestRenderFrameHost : public RenderFrameHostImpl {
17 public: 19 public:
(...skipping 18 matching lines...) Expand all
36 void SendNavigateWithOriginalRequestURL( 38 void SendNavigateWithOriginalRequestURL(
37 int page_id, 39 int page_id,
38 const GURL& url, 40 const GURL& url,
39 const GURL& original_request_url); 41 const GURL& original_request_url);
40 void SendNavigateWithFile( 42 void SendNavigateWithFile(
41 int page_id, 43 int page_id,
42 const GURL& url, 44 const GURL& url,
43 const base::FilePath& file_path); 45 const base::FilePath& file_path);
44 void SendNavigateWithParams( 46 void SendNavigateWithParams(
45 FrameHostMsg_DidCommitProvisionalLoad_Params* params); 47 FrameHostMsg_DidCommitProvisionalLoad_Params* params);
48 void SendNavigateWithRedirects(
49 int page_id,
50 const GURL& url,
51 const std::vector<GURL>& redirects);
46 void SendNavigateWithParameters( 52 void SendNavigateWithParameters(
47 int page_id, 53 int page_id,
48 const GURL& url, 54 const GURL& url,
49 PageTransition transition, 55 PageTransition transition,
50 const GURL& original_request_url, 56 const GURL& original_request_url,
51 int response_code, 57 int response_code,
52 const base::FilePath* file_path_for_history_item); 58 const base::FilePath* file_path_for_history_item,
59 const std::vector<GURL>& redirects);
53 60
54 void set_contents_mime_type(const std::string& mime_type) { 61 void set_contents_mime_type(const std::string& mime_type) {
55 contents_mime_type_ = mime_type; 62 contents_mime_type_ = mime_type;
56 } 63 }
57 64
58 // If set, navigations will appear to have cleared the history list in the 65 // If set, navigations will appear to have cleared the history list in the
59 // RenderFrame 66 // RenderFrame
60 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared). 67 // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared).
61 // False by default. 68 // False by default.
62 void set_simulate_history_list_was_cleared(bool cleared) { 69 void set_simulate_history_list_was_cleared(bool cleared) {
63 simulate_history_list_was_cleared_ = cleared; 70 simulate_history_list_was_cleared_ = cleared;
64 } 71 }
65 72
66 // TODO(nick): As necessary for testing, override behavior of RenderFrameHost 73 // TODO(nick): As necessary for testing, override behavior of RenderFrameHost
67 // here. 74 // here.
68 75
69 private: 76 private:
70 std::string contents_mime_type_; 77 std::string contents_mime_type_;
71 78
72 // See set_simulate_history_list_was_cleared() above. 79 // See set_simulate_history_list_was_cleared() above.
73 bool simulate_history_list_was_cleared_; 80 bool simulate_history_list_was_cleared_;
74 81
75 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); 82 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
76 }; 83 };
77 84
78 } // namespace content 85 } // namespace content
79 86
80 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ 87 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
OLDNEW
« no previous file with comments | « content/public/common/page_transition_types.cc ('k') | content/test/test_render_frame_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698