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

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

Issue 2696263002: Refactor ViewsDelegate and MD-ify the icon-to-text spacing for checkbox and radiobutton (Closed)
Patch Set: Fix unit tests to use a ViewsDelegate to guard against crashes Created 3 years, 9 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/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 ->SendFailedNavigate(entry->GetUniqueID(), false, entry->GetURL()); 258 ->SendFailedNavigate(entry->GetUniqueID(), false, entry->GetURL());
259 } 259 }
260 260
261 void RenderViewHostTestHarness::SetUp() { 261 void RenderViewHostTestHarness::SetUp() {
262 // ContentTestSuiteBase might have already initialized 262 // ContentTestSuiteBase might have already initialized
263 // MaterialDesignController in unit_tests suite. 263 // MaterialDesignController in unit_tests suite.
264 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); 264 ui::test::MaterialDesignControllerTestAPI::Uninitialize();
265 ui::MaterialDesignController::Initialize(); 265 ui::MaterialDesignController::Initialize();
266 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_)); 266 thread_bundle_.reset(new TestBrowserThreadBundle(thread_bundle_options_));
267 267
268 rvh_test_enabler_.reset(new RenderViewHostTestEnabler); 268 rvh_test_enabler_.reset(new RenderViewHostTestEnabler());
269 if (factory_) 269 if (factory_)
270 rvh_test_enabler_->rvh_factory_->set_render_process_host_factory(factory_); 270 rvh_test_enabler_->rvh_factory_->set_render_process_host_factory(factory_);
271 271
272 #if defined(OS_WIN) 272 #if defined(OS_WIN)
273 ole_initializer_.reset(new ui::ScopedOleInitializer()); 273 ole_initializer_.reset(new ui::ScopedOleInitializer());
274 #endif 274 #endif
275 #if defined(USE_AURA) 275 #if defined(USE_AURA)
276 ui::ContextFactory* context_factory = 276 ui::ContextFactory* context_factory =
277 ImageTransportFactory::GetInstance()->GetContextFactory(); 277 ImageTransportFactory::GetInstance()->GetContextFactory();
278 ui::ContextFactoryPrivate* context_factory_private = 278 ui::ContextFactoryPrivate* context_factory_private =
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 335 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
336 RenderProcessHostFactory* factory) { 336 RenderProcessHostFactory* factory) {
337 if (rvh_test_enabler_) 337 if (rvh_test_enabler_)
338 rvh_test_enabler_->rvh_factory_->set_render_process_host_factory(factory); 338 rvh_test_enabler_->rvh_factory_->set_render_process_host_factory(factory);
339 else 339 else
340 factory_ = factory; 340 factory_ = factory;
341 } 341 }
342 342
343 } // namespace content 343 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698