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, | 55 void SendNavigate(int page_id, const GURL& url) override; |
56 int nav_entry_id, | 56 void SendFailedNavigate(int page_id, const GURL& url) override; |
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; | |
63 void SendNavigateWithTransition(int page_id, | 57 void SendNavigateWithTransition(int page_id, |
64 int nav_entry_id, | |
65 bool did_create_new_entry, | |
66 const GURL& url, | 58 const GURL& url, |
67 ui::PageTransition transition) override; | 59 ui::PageTransition transition) override; |
68 void SetContentsMimeType(const std::string& mime_type) override; | 60 void SetContentsMimeType(const std::string& mime_type) override; |
69 void SendBeforeUnloadACK(bool proceed) override; | 61 void SendBeforeUnloadACK(bool proceed) override; |
70 void SimulateSwapOutACK() override; | 62 void SimulateSwapOutACK() override; |
71 | 63 |
72 void SendNavigateWithTransitionAndResponseCode(int page_id, | 64 void SendNavigateWithTransitionAndResponseCode( |
73 int nav_entry_id, | 65 int page_id, |
74 bool did_create_new_entry, | 66 const GURL& url, ui::PageTransition transition, |
75 const GURL& url, | 67 int response_code); |
76 ui::PageTransition transition, | 68 void SendNavigateWithOriginalRequestURL( |
77 int response_code); | 69 int page_id, |
78 void SendNavigateWithOriginalRequestURL(int page_id, | 70 const GURL& url, |
79 int nav_entry_id, | 71 const GURL& original_request_url); |
80 bool did_create_new_entry, | 72 void SendNavigateWithFile( |
81 const GURL& url, | 73 int page_id, |
82 const GURL& original_request_url); | 74 const GURL& url, |
83 void SendNavigateWithFile(int page_id, | 75 const base::FilePath& file_path); |
84 int nav_entry_id, | |
85 bool did_create_new_entry, | |
86 const GURL& url, | |
87 const base::FilePath& file_path); | |
88 void SendNavigateWithParams( | 76 void SendNavigateWithParams( |
89 FrameHostMsg_DidCommitProvisionalLoad_Params* params); | 77 FrameHostMsg_DidCommitProvisionalLoad_Params* params); |
90 void SendNavigateWithRedirects(int page_id, | 78 void SendNavigateWithRedirects( |
91 int nav_entry_id, | 79 int page_id, |
92 bool did_create_new_entry, | 80 const GURL& url, |
93 const GURL& url, | 81 const std::vector<GURL>& redirects); |
94 const std::vector<GURL>& redirects); | |
95 void SendNavigateWithParameters( | 82 void SendNavigateWithParameters( |
96 int page_id, | 83 int page_id, |
97 int nav_entry_id, | |
98 bool did_create_new_entry, | |
99 const GURL& url, | 84 const GURL& url, |
100 ui::PageTransition transition, | 85 ui::PageTransition transition, |
101 const GURL& original_request_url, | 86 const GURL& original_request_url, |
102 int response_code, | 87 int response_code, |
103 const base::FilePath* file_path_for_history_item, | 88 const base::FilePath* file_path_for_history_item, |
104 const std::vector<GURL>& redirects); | 89 const std::vector<GURL>& redirects); |
105 | 90 |
106 // Simulate a renderer-initiated navigation up until commit. | 91 // Simulate a renderer-initiated navigation up until commit. |
107 void NavigateAndCommitRendererInitiated(int page_id, | 92 void NavigateAndCommitRendererInitiated(int page_id, const GURL& url); |
108 bool did_create_new_entry, | |
109 const GURL& url); | |
110 | 93 |
111 // With the current navigation logic this method is a no-op. | 94 // With the current navigation logic this method is a no-op. |
112 // PlzNavigate: this method simulates receiving a BeginNavigation IPC. | 95 // PlzNavigate: this method simulates receiving a BeginNavigation IPC. |
113 void SendRendererInitiatedNavigationRequest(const GURL& url, | 96 void SendRendererInitiatedNavigationRequest(const GURL& url, |
114 bool has_user_gesture); | 97 bool has_user_gesture); |
115 | 98 |
116 void DidDisownOpener(); | 99 void DidDisownOpener(); |
117 | 100 |
118 // If set, navigations will appear to have cleared the history list in the | 101 // If set, navigations will appear to have cleared the history list in the |
119 // RenderFrame | 102 // RenderFrame |
(...skipping 27 matching lines...) Expand all Loading... |
147 | 130 |
148 // See set_simulate_history_list_was_cleared() above. | 131 // See set_simulate_history_list_was_cleared() above. |
149 bool simulate_history_list_was_cleared_; | 132 bool simulate_history_list_was_cleared_; |
150 | 133 |
151 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); | 134 DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost); |
152 }; | 135 }; |
153 | 136 |
154 } // namespace content | 137 } // namespace content |
155 | 138 |
156 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ | 139 #endif // CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_ |
OLD | NEW |