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 aura::RootWindow* root_window() const { return root_window_.get(); } | |
Avi (use Gerrit)
2012/03/13 15:07:37
#if defined(USE_AURA)
DaveMoore
2012/03/13 23:33:56
Done.
| |
153 | |
152 // Replaces the RPH being used. | 154 // Replaces the RPH being used. |
153 void SetRenderProcessHostFactory(RenderProcessHostFactory* factory); | 155 void SetRenderProcessHostFactory(RenderProcessHostFactory* factory); |
154 | 156 |
155 // This browser context will be created in SetUp if it has not already been | 157 // This browser context will be created in SetUp if it has not already been |
156 // created. This allows tests to override the browser context if they so | 158 // created. This allows tests to override the browser context if they so |
157 // choose in their own SetUp function before calling the base class's (us) | 159 // choose in their own SetUp function before calling the base class's (us) |
158 // SetUp(). | 160 // SetUp(). |
159 scoped_ptr<BrowserContext> browser_context_; | 161 scoped_ptr<BrowserContext> browser_context_; |
160 | 162 |
161 MessageLoopForUI message_loop_; | 163 MessageLoopForUI message_loop_; |
162 | 164 |
163 private: | 165 private: |
164 scoped_ptr<TestTabContents> contents_; | 166 scoped_ptr<TestTabContents> contents_; |
165 #if defined(USE_AURA) | 167 #if defined(USE_AURA) |
166 scoped_ptr<aura::RootWindow> root_window_; | 168 scoped_ptr<aura::RootWindow> root_window_; |
167 scoped_ptr<aura::test::TestStackingClient> test_stacking_client_; | 169 scoped_ptr<aura::test::TestStackingClient> test_stacking_client_; |
168 #endif | 170 #endif |
169 RenderViewHostTestEnabler rvh_test_enabler_; | 171 RenderViewHostTestEnabler rvh_test_enabler_; |
170 | 172 |
171 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); | 173 DISALLOW_COPY_AND_ASSIGN(RenderViewHostTestHarness); |
172 }; | 174 }; |
173 | 175 |
174 } // namespace content | 176 } // namespace content |
175 | 177 |
176 // TODO(joi): Remove this after converting all clients. | 178 // TODO(joi): Remove this after converting all clients. |
177 using content::RenderViewHostTestHarness; | 179 using content::RenderViewHostTestHarness; |
178 | 180 |
179 #endif // CONTENT_TEST_TEST_RENDERER_HOST_H_ | 181 #endif // CONTENT_TEST_TEST_RENDERER_HOST_H_ |
OLD | NEW |