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