Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(211)

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 2375663002: Replace MessageLoop::current()->task_runner() with ThreadTaskRunnerHandle::Get(). (Closed)
Patch Set: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread_task_runner_handle.h"
10 #include "build/build_config.h" 11 #include "build/build_config.h"
11 #include "content/browser/compositor/test/no_transport_image_transport_factory.h " 12 #include "content/browser/compositor/test/no_transport_image_transport_factory.h "
12 #include "content/browser/frame_host/navigation_entry_impl.h" 13 #include "content/browser/frame_host/navigation_entry_impl.h"
13 #include "content/browser/renderer_host/render_view_host_factory.h" 14 #include "content/browser/renderer_host/render_view_host_factory.h"
14 #include "content/browser/renderer_host/render_widget_host_impl.h" 15 #include "content/browser/renderer_host/render_widget_host_impl.h"
15 #include "content/browser/site_instance_impl.h" 16 #include "content/browser/site_instance_impl.h"
16 #include "content/public/browser/browser_thread.h" 17 #include "content/public/browser/browser_thread.h"
17 #include "content/public/browser/web_contents.h" 18 #include "content/public/browser/web_contents.h"
18 #include "content/public/common/browser_side_navigation_policy.h" 19 #include "content/public/common/browser_side_navigation_policy.h"
19 #include "content/public/test/browser_side_navigation_test_utils.h" 20 #include "content/public/test/browser_side_navigation_test_utils.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 266
266 DCHECK(!browser_context_); 267 DCHECK(!browser_context_);
267 browser_context_.reset(CreateBrowserContext()); 268 browser_context_.reset(CreateBrowserContext());
268 269
269 SetContents(CreateTestWebContents()); 270 SetContents(CreateTestWebContents());
270 271
271 if (IsBrowserSideNavigationEnabled()) 272 if (IsBrowserSideNavigationEnabled())
272 BrowserSideNavigationSetUp(); 273 BrowserSideNavigationSetUp();
273 274
274 #if defined(OS_MACOSX) 275 #if defined(OS_MACOSX)
275 ui::WindowResizeHelperMac::Get()->Init( 276 ui::WindowResizeHelperMac::Get()->Init(base::ThreadTaskRunnerHandle::Get());
276 base::MessageLoop::current()->task_runner());
277 #endif // OS_MACOSX 277 #endif // OS_MACOSX
278 } 278 }
279 279
280 void RenderViewHostTestHarness::TearDown() { 280 void RenderViewHostTestHarness::TearDown() {
281 if (IsBrowserSideNavigationEnabled()) 281 if (IsBrowserSideNavigationEnabled())
282 BrowserSideNavigationTearDown(); 282 BrowserSideNavigationTearDown();
283 283
284 SetContents(NULL); 284 SetContents(NULL);
285 #if defined(USE_AURA) 285 #if defined(USE_AURA)
286 aura_test_helper_->TearDown(); 286 aura_test_helper_->TearDown();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 325 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
326 return new TestBrowserContext(); 326 return new TestBrowserContext();
327 } 327 }
328 328
329 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 329 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
330 RenderProcessHostFactory* factory) { 330 RenderProcessHostFactory* factory) {
331 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 331 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
332 } 332 }
333 333
334 } // namespace content 334 } // namespace content
OLDNEW
« no previous file with comments | « content/common/child_process_host_impl.cc ('k') | device/generic_sensor/platform_sensor_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698