OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // This is a helper function for simulating the most common types of loads. | 176 // This is a helper function for simulating the most common types of loads. |
177 void SendNavigate(int page_id, const GURL& url); | 177 void SendNavigate(int page_id, const GURL& url); |
178 | 178 |
179 // Calls OnMsgNavigate on the RenderViewHost with the given information, | 179 // Calls OnMsgNavigate on the RenderViewHost with the given information, |
180 // including a custom PageTransition::Type. Sets the rest of the parameters | 180 // including a custom PageTransition::Type. Sets the rest of the parameters |
181 // in the message to the "typical" values. | 181 // in the message to the "typical" values. |
182 // This is a helper function for simulating the most common types of loads. | 182 // This is a helper function for simulating the most common types of loads. |
183 void SendNavigateWithTransition(int page_id, const GURL& url, | 183 void SendNavigateWithTransition(int page_id, const GURL& url, |
184 PageTransition::Type transition); | 184 PageTransition::Type transition); |
185 | 185 |
| 186 // Calls OnMsgShouldCloseACK on the RenderViewHost with the given parameter. |
| 187 void SendShouldCloseACK(bool proceed); |
| 188 |
186 // If set, *delete_counter is incremented when this object destructs. | 189 // If set, *delete_counter is incremented when this object destructs. |
187 void set_delete_counter(int* delete_counter) { | 190 void set_delete_counter(int* delete_counter) { |
188 delete_counter_ = delete_counter; | 191 delete_counter_ = delete_counter; |
189 } | 192 } |
190 | 193 |
191 // Sets whether the RenderView currently exists or not. This controls the | 194 // Sets whether the RenderView currently exists or not. This controls the |
192 // return value from IsRenderViewLive, which the rest of the system uses to | 195 // return value from IsRenderViewLive, which the rest of the system uses to |
193 // check whether the RenderView has crashed or not. | 196 // check whether the RenderView has crashed or not. |
194 void set_render_view_created(bool created) { | 197 void set_render_view_created(bool created) { |
195 render_view_created_ = created; | 198 render_view_created_ = created; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 MockRenderProcessHostFactory rph_factory_; | 316 MockRenderProcessHostFactory rph_factory_; |
314 TestRenderViewHostFactory rvh_factory_; | 317 TestRenderViewHostFactory rvh_factory_; |
315 | 318 |
316 private: | 319 private: |
317 scoped_ptr<TestTabContents> contents_; | 320 scoped_ptr<TestTabContents> contents_; |
318 | 321 |
319 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 322 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
320 }; | 323 }; |
321 | 324 |
322 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 325 #endif // CONTENT_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
OLD | NEW |