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