OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDERER_HOST_H_ | 5 #ifndef CONTENT_TEST_TEST_RENDERER_HOST_H_ |
6 #define CONTENT_TEST_TEST_RENDERER_HOST_H_ | 6 #define CONTENT_TEST_TEST_RENDERER_HOST_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 void NavigateAndCommit(const GURL& url); | 142 void NavigateAndCommit(const GURL& url); |
143 | 143 |
144 // Simulates a reload of the current page. | 144 // Simulates a reload of the current page. |
145 void Reload(); | 145 void Reload(); |
146 | 146 |
147 protected: | 147 protected: |
148 // testing::Test | 148 // testing::Test |
149 virtual void SetUp() OVERRIDE; | 149 virtual void SetUp() OVERRIDE; |
150 virtual void TearDown() OVERRIDE; | 150 virtual void TearDown() OVERRIDE; |
151 | 151 |
152 #if defined(USE_AURA) | |
153 aura::RootWindow* root_window() const { return root_window_.get(); } | |
154 #endif | |
155 | |
156 // Replaces the RPH being used. | 152 // Replaces the RPH being used. |
157 void SetRenderProcessHostFactory(RenderProcessHostFactory* factory); | 153 void SetRenderProcessHostFactory(RenderProcessHostFactory* factory); |
158 | 154 |
159 // This browser context will be created in SetUp if it has not already been | 155 // This browser context will be created in SetUp if it has not already been |
160 // created. This allows tests to override the browser context if they so | 156 // created. This allows tests to override the browser context if they so |
161 // choose in their own SetUp function before calling the base class's (us) | 157 // choose in their own SetUp function before calling the base class's (us) |
162 // SetUp(). | 158 // SetUp(). |
163 scoped_ptr<BrowserContext> browser_context_; | 159 scoped_ptr<BrowserContext> browser_context_; |
164 | 160 |
165 MessageLoopForUI message_loop_; | 161 MessageLoopForUI message_loop_; |
166 | 162 |
167 private: | 163 private: |
168 scoped_ptr<TestTabContents> contents_; | 164 scoped_ptr<TestTabContents> contents_; |
169 #if defined(USE_AURA) | 165 #if defined(USE_AURA) |
170 scoped_ptr<aura::RootWindow> root_window_; | 166 scoped_ptr<aura::RootWindow> root_window_; |
171 scoped_ptr<aura::test::TestStackingClient> test_stacking_client_; | 167 scoped_ptr<aura::test::TestStackingClient> test_stacking_client_; |
172 #endif | 168 #endif |
173 RenderViewHostTestEnabler rvh_test_enabler_; | 169 RenderViewHostTestEnabler rvh_test_enabler_; |
174 | 170 |
175 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 171 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
176 }; | 172 }; |
177 | 173 |
178 } // namespace content | 174 } // namespace content |
179 | 175 |
180 // TODO(joi): Remove this after converting all clients. | 176 // TODO(joi): Remove this after converting all clients. |
181 using content::RenderViewHostTestHarness; | 177 using content::RenderViewHostTestHarness; |
182 | 178 |
183 #endif // CONTENT_TEST_TEST_RENDERER_HOST_H_ | 179 #endif // CONTENT_TEST_TEST_RENDERER_HOST_H_ |
OLD | NEW |