OLD | NEW |
---|---|
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> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 int routing_id, | 45 int routing_id, |
46 int flags); | 46 int flags); |
47 ~TestRenderFrameHost() override; | 47 ~TestRenderFrameHost() override; |
48 | 48 |
49 // RenderFrameHostImpl overrides (same values, but in Test*/Mock* types) | 49 // RenderFrameHostImpl overrides (same values, but in Test*/Mock* types) |
50 TestRenderViewHost* GetRenderViewHost() override; | 50 TestRenderViewHost* GetRenderViewHost() override; |
51 MockRenderProcessHost* GetProcess() override; | 51 MockRenderProcessHost* GetProcess() override; |
52 | 52 |
53 // RenderFrameHostTester implementation. | 53 // RenderFrameHostTester implementation. |
54 TestRenderFrameHost* AppendChild(const std::string& frame_name) override; | 54 TestRenderFrameHost* AppendChild(const std::string& frame_name) override; |
55 void SendNavigate(int page_id, const GURL& url) override; | 55 void SendNavigate(int page_id, |
Charlie Reis
2015/04/22 05:27:25
I feel like we should give some guidance on what t
Avi (use Gerrit)
2015/04/22 18:31:51
My opinion, based on reading tests that use these
| |
56 void SendFailedNavigate(int page_id, const GURL& url) override; | 56 int nav_entry_id, |
57 bool did_create_new_entry, | |
58 const GURL& url) override; | |
59 void SendFailedNavigate(int page_id, | |
60 int nav_entry_id, | |
61 bool did_create_new_entry, | |
62 const GURL& url) override; | |
57 void SendNavigateWithTransition(int page_id, | 63 void SendNavigateWithTransition(int page_id, |
64 int nav_entry_id, | |
65 bool did_create_new_entry, | |
58 const GURL& url, | 66 const GURL& url, |
59 ui::PageTransition transition) override; | 67 ui::PageTransition transition) override; |
60 void SetContentsMimeType(const std::string& mime_type) override; | 68 void SetContentsMimeType(const std::string& mime_type) override; |
61 void SendBeforeUnloadACK(bool proceed) override; | 69 void SendBeforeUnloadACK(bool proceed) override; |
62 void SimulateSwapOutACK() override; | 70 void SimulateSwapOutACK() override; |
63 | 71 |
64 void SendNavigateWithTransitionAndResponseCode( | 72 void SendNavigateWithTransitionAndResponseCode(int page_id, |
65 int page_id, | 73 int nav_entry_id, |
66 const GURL& url, ui::PageTransition transition, | 74 bool did_create_new_entry, |
67 int response_code); | 75 const GURL& url, |
68 void SendNavigateWithOriginalRequestURL( | 76 ui::PageTransition transition, |
69 int page_id, | 77 int response_code); |
70 const GURL& url, | 78 void SendNavigateWithOriginalRequestURL(int page_id, |
71 const GURL& original_request_url); | 79 int nav_entry_id, |
72 void SendNavigateWithFile( | 80 bool did_create_new_entry, |
73 int page_id, | 81 const GURL& url, |
74 const GURL& url, | 82 const GURL& original_request_url); |
75 const base::FilePath& file_path); | 83 void SendNavigateWithFile(int page_id, |
84 int nav_entry_id, | |
85 bool did_create_new_entry, | |
86 const GURL& url, | |
87 const base::FilePath& file_path); | |
76 void SendNavigateWithParams( | 88 void SendNavigateWithParams( |
77 FrameHostMsg_DidCommitProvisionalLoad_Params* params); | 89 FrameHostMsg_DidCommitProvisionalLoad_Params* params); |
78 void SendNavigateWithRedirects( | 90 void SendNavigateWithRedirects(int page_id, |
79 int page_id, | 91 int nav_entry_id, |
80 const GURL& url, | 92 bool did_create_new_entry, |
81 const std::vector<GURL>& redirects); | 93 const GURL& url, |
94 const std::vector<GURL>& redirects); | |
82 void SendNavigateWithParameters( | 95 void SendNavigateWithParameters( |
83 int page_id, | 96 int page_id, |
97 int nav_entry_id, | |
98 bool did_create_new_entry, | |
84 const GURL& url, | 99 const GURL& url, |
85 ui::PageTransition transition, | 100 ui::PageTransition transition, |
86 const GURL& original_request_url, | 101 const GURL& original_request_url, |
87 int response_code, | 102 int response_code, |
88 const base::FilePath* file_path_for_history_item, | 103 const base::FilePath* file_path_for_history_item, |
89 const std::vector<GURL>& redirects); | 104 const std::vector<GURL>& redirects); |
90 | 105 |
91 // Simulate a renderer-initiated navigation up until commit. | 106 // Simulate a renderer-initiated navigation up until commit. |
92 void NavigateAndCommitRendererInitiated(int page_id, const GURL& url); | 107 void NavigateAndCommitRendererInitiated(int page_id, |
108 bool did_create_new_entry, | |
109 const GURL& url); | |
93 | 110 |
94 // With the current navigation logic this method is a no-op. | 111 // With the current navigation logic this method is a no-op. |
95 // PlzNavigate: this method simulates receiving a BeginNavigation IPC. | 112 // PlzNavigate: this method simulates receiving a BeginNavigation IPC. |
96 void SendRendererInitiatedNavigationRequest(const GURL& url, | 113 void SendRendererInitiatedNavigationRequest(const GURL& url, |
97 bool has_user_gesture); | 114 bool has_user_gesture); |
98 | 115 |
99 void DidDisownOpener(); | 116 void DidDisownOpener(); |
100 | 117 |
101 // If set, navigations will appear to have cleared the history list in the | 118 // If set, navigations will appear to have cleared the history list in the |
102 // RenderFrame | 119 // RenderFrame |
(...skipping 27 matching lines...) Expand all Loading... | |
130 | 147 |
131 // See set_simulate_history_list_was_cleared() above. | 148 // See set_simulate_history_list_was_cleared() above. |
132 bool simulate_history_list_was_cleared_; | 149 bool simulate_history_list_was_cleared_; |
133 | 150 |
134 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 151 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
135 }; | 152 }; |
136 | 153 |
137 } // namespace content | 154 } // namespace content |
138 | 155 |
139 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 156 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |