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

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

Issue 1878973002: [reland] Makes MaterialDesignController initialization explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Made it possible to restore MaterialDesignController state after each test case (nits) Created 4 years, 8 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
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/content_test_suite_base.h" 5 #include "content/public/test/content_test_suite_base.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/metrics/statistics_recorder.h" 11 #include "base/metrics/statistics_recorder.h"
12 #include "base/test/test_suite.h" 12 #include "base/test/test_suite.h"
13 #include "base/threading/sequenced_worker_pool.h" 13 #include "base/threading/sequenced_worker_pool.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "content/browser/browser_thread_impl.h" 15 #include "content/browser/browser_thread_impl.h"
16 #include "content/browser/gpu/gpu_process_host.h" 16 #include "content/browser/gpu/gpu_process_host.h"
17 #include "content/browser/renderer_host/render_process_host_impl.h" 17 #include "content/browser/renderer_host/render_process_host_impl.h"
18 #include "content/browser/utility_process_host_impl.h" 18 #include "content/browser/utility_process_host_impl.h"
19 #include "content/common/url_schemes.h" 19 #include "content/common/url_schemes.h"
20 #include "content/gpu/in_process_gpu_thread.h" 20 #include "content/gpu/in_process_gpu_thread.h"
21 #include "content/public/common/content_client.h" 21 #include "content/public/common/content_client.h"
22 #include "content/renderer/in_process_renderer_thread.h" 22 #include "content/renderer/in_process_renderer_thread.h"
23 #include "content/utility/in_process_utility_thread.h" 23 #include "content/utility/in_process_utility_thread.h"
24 #include "testing/gtest/include/gtest/gtest.h" 24 #include "testing/gtest/include/gtest/gtest.h"
25 #include "ui/base/material_design/material_design_controller.h"
25 #include "ui/base/ui_base_paths.h" 26 #include "ui/base/ui_base_paths.h"
26 27
27 #if defined(V8_USE_EXTERNAL_STARTUP_DATA) 28 #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
28 #include "gin/v8_initializer.h" 29 #include "gin/v8_initializer.h"
29 #endif 30 #endif
30 31
31 #if defined(OS_ANDROID) 32 #if defined(OS_ANDROID)
32 #include "base/android/jni_android.h" 33 #include "base/android/jni_android.h"
33 #include "content/browser/android/browser_jni_registrar.h" 34 #include "content/browser/android/browser_jni_registrar.h"
34 #include "content/common/android/common_jni_registrar.h" 35 #include "content/common/android/common_jni_registrar.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 content::Compositor::Initialize(); 101 content::Compositor::Initialize();
101 #endif 102 #endif
102 #endif 103 #endif
103 104
104 #if defined(USE_OZONE) 105 #if defined(USE_OZONE)
105 ui::OzonePlatform::InitializeForUI(); 106 ui::OzonePlatform::InitializeForUI();
106 #endif 107 #endif
107 108
108 testing::UnitTest::GetInstance()->listeners().Append( 109 testing::UnitTest::GetInstance()->listeners().Append(
109 new ContentTestSuiteBaseListener); 110 new ContentTestSuiteBaseListener);
111 ui::MaterialDesignController::Initialize();
110 } 112 }
111 113
112 void ContentTestSuiteBase::RegisterContentSchemes( 114 void ContentTestSuiteBase::RegisterContentSchemes(
113 ContentClient* content_client) { 115 ContentClient* content_client) {
114 SetContentClient(content_client); 116 SetContentClient(content_client);
115 content::RegisterContentSchemes(false); 117 content::RegisterContentSchemes(false);
116 SetContentClient(NULL); 118 SetContentClient(NULL);
117 } 119 }
118 120
119 void ContentTestSuiteBase::RegisterInProcessThreads() { 121 void ContentTestSuiteBase::RegisterInProcessThreads() {
120 UtilityProcessHostImpl::RegisterUtilityMainThreadFactory( 122 UtilityProcessHostImpl::RegisterUtilityMainThreadFactory(
121 CreateInProcessUtilityThread); 123 CreateInProcessUtilityThread);
122 RenderProcessHostImpl::RegisterRendererMainThreadFactory( 124 RenderProcessHostImpl::RegisterRendererMainThreadFactory(
123 CreateInProcessRendererThread); 125 CreateInProcessRendererThread);
124 GpuProcessHost::RegisterGpuMainThreadFactory(CreateInProcessGpuThread); 126 GpuProcessHost::RegisterGpuMainThreadFactory(CreateInProcessGpuThread);
125 } 127 }
126 128
127 } // namespace content 129 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/browser_test_base.cc ('k') | content/public/test/test_renderer_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698