| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 6 #define CHROME_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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 public: | 159 public: |
| 160 TestRenderViewHost(SiteInstance* instance, | 160 TestRenderViewHost(SiteInstance* instance, |
| 161 RenderViewHostDelegate* delegate, | 161 RenderViewHostDelegate* delegate, |
| 162 int routing_id); | 162 int routing_id); |
| 163 virtual ~TestRenderViewHost(); | 163 virtual ~TestRenderViewHost(); |
| 164 | 164 |
| 165 // Testing functions --------------------------------------------------------- | 165 // Testing functions --------------------------------------------------------- |
| 166 | 166 |
| 167 // Calls the RenderViewHosts' private OnMessageReceived function with the | 167 // Calls the RenderViewHosts' private OnMessageReceived function with the |
| 168 // given message. | 168 // given message. |
| 169 void TestOnMessageReceived(const IPC::Message& msg); | 169 bool TestOnMessageReceived(const IPC::Message& msg); |
| 170 | 170 |
| 171 // Calls OnMsgNavigate on the RenderViewHost with the given information, | 171 // Calls OnMsgNavigate on the RenderViewHost with the given information, |
| 172 // setting the rest of the parameters in the message to the "typical" values. | 172 // setting the rest of the parameters in the message to the "typical" values. |
| 173 // This is a helper function for simulating the most common types of loads. | 173 // This is a helper function for simulating the most common types of loads. |
| 174 void SendNavigate(int page_id, const GURL& url); | 174 void SendNavigate(int page_id, const GURL& url); |
| 175 | 175 |
| 176 // Calls OnMsgNavigate on the RenderViewHost with the given information, | 176 // Calls OnMsgNavigate on the RenderViewHost with the given information, |
| 177 // including a custom PageTransition::Type. Sets the rest of the parameters | 177 // including a custom PageTransition::Type. Sets the rest of the parameters |
| 178 // in the message to the "typical" values. | 178 // in the message to the "typical" values. |
| 179 // This is a helper function for simulating the most common types of loads. | 179 // This is a helper function for simulating the most common types of loads. |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 MockRenderProcessHostFactory rph_factory_; | 291 MockRenderProcessHostFactory rph_factory_; |
| 292 TestRenderViewHostFactory rvh_factory_; | 292 TestRenderViewHostFactory rvh_factory_; |
| 293 | 293 |
| 294 scoped_ptr<TestTabContents> contents_; | 294 scoped_ptr<TestTabContents> contents_; |
| 295 | 295 |
| 296 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 296 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
| 297 }; | 297 }; |
| 298 | 298 |
| 299 #endif // CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ | 299 #endif // CHROME_BROWSER_RENDERER_HOST_TEST_TEST_RENDER_VIEW_HOST_H_ |
| OLD | NEW |