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 #include "content/public/test/test_renderer_host.h" | 5 #include "content/public/test/test_renderer_host.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/run_loop.h" | 10 #include "base/run_loop.h" |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
274 aura_test_helper_->SetUp(context_factory, context_factory_private); | 274 aura_test_helper_->SetUp(context_factory, context_factory_private); |
275 new wm::DefaultActivationClient(aura_test_helper_->root_window()); | 275 new wm::DefaultActivationClient(aura_test_helper_->root_window()); |
276 #endif | 276 #endif |
277 | 277 |
278 sanity_checker_.reset(new ContentBrowserSanityChecker()); | 278 sanity_checker_.reset(new ContentBrowserSanityChecker()); |
279 | 279 |
280 DCHECK(!browser_context_); | 280 DCHECK(!browser_context_); |
281 browser_context_.reset(CreateBrowserContext()); | 281 browser_context_.reset(CreateBrowserContext()); |
282 | 282 |
283 SetContents(CreateTestWebContents()); | 283 SetContents(CreateTestWebContents()); |
284 #if defined(USE_AURA) | |
285 static_cast<content::TestRenderWidgetHostView*>( | |
286 web_contents()->GetRenderWidgetHostView()) | |
287 ->set_native_view(aura_test_helper_->root_window()); | |
sky
2017/05/07 22:44:23
This is confusing as you're setting the aura::Wind
Bret
2017/05/09 23:44:42
Okay I made TestRenderWidgetHostView a WindowDeleg
| |
288 #endif | |
284 | 289 |
285 if (IsBrowserSideNavigationEnabled()) | 290 if (IsBrowserSideNavigationEnabled()) |
286 BrowserSideNavigationSetUp(); | 291 BrowserSideNavigationSetUp(); |
287 } | 292 } |
288 | 293 |
289 void RenderViewHostTestHarness::TearDown() { | 294 void RenderViewHostTestHarness::TearDown() { |
290 if (IsBrowserSideNavigationEnabled()) | 295 if (IsBrowserSideNavigationEnabled()) |
291 BrowserSideNavigationTearDown(); | 296 BrowserSideNavigationTearDown(); |
292 | 297 |
293 SetContents(NULL); | 298 SetContents(NULL); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
325 | 330 |
326 void RenderViewHostTestHarness::SetRenderProcessHostFactory( | 331 void RenderViewHostTestHarness::SetRenderProcessHostFactory( |
327 RenderProcessHostFactory* factory) { | 332 RenderProcessHostFactory* factory) { |
328 if (rvh_test_enabler_) | 333 if (rvh_test_enabler_) |
329 rvh_test_enabler_->rvh_factory_->set_render_process_host_factory(factory); | 334 rvh_test_enabler_->rvh_factory_->set_render_process_host_factory(factory); |
330 else | 335 else |
331 factory_ = factory; | 336 factory_ = factory; |
332 } | 337 } |
333 | 338 |
334 } // namespace content | 339 } // namespace content |
OLD | NEW |