OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "chrome/test/base/chrome_unit_test_suite.h" | 5 #include "chrome/test/base/chrome_unit_test_suite.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/process/process_handle.h" | 8 #include "base/process/process_handle.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "chrome/browser/chrome_content_browser_client.h" | 10 #include "chrome/browser/chrome_content_browser_client.h" |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 | 104 |
105 InitializeProviders(); | 105 InitializeProviders(); |
106 RegisterInProcessThreads(); | 106 RegisterInProcessThreads(); |
107 | 107 |
108 ChromeTestSuite::Initialize(); | 108 ChromeTestSuite::Initialize(); |
109 | 109 |
110 // This needs to run after ChromeTestSuite::Initialize which calls content's | 110 // This needs to run after ChromeTestSuite::Initialize which calls content's |
111 // intialization which calls base's which initializes ICU. | 111 // intialization which calls base's which initializes ICU. |
112 InitializeResourceBundle(); | 112 InitializeResourceBundle(); |
113 | 113 |
114 base::DiscardableMemoryShmemAllocator::SetInstance( | 114 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |
115 &discardable_memory_allocator_); | |
116 } | 115 } |
117 | 116 |
118 void ChromeUnitTestSuite::Shutdown() { | 117 void ChromeUnitTestSuite::Shutdown() { |
119 ResourceBundle::CleanupSharedInstance(); | 118 ResourceBundle::CleanupSharedInstance(); |
120 ChromeTestSuite::Shutdown(); | 119 ChromeTestSuite::Shutdown(); |
121 } | 120 } |
122 | 121 |
123 void ChromeUnitTestSuite::InitializeProviders() { | 122 void ChromeUnitTestSuite::InitializeProviders() { |
124 { | 123 { |
125 ChromeContentClient content_client; | 124 ChromeContentClient content_client; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 #if defined(OS_MACOSX) && !defined(OS_IOS) | 165 #if defined(OS_MACOSX) && !defined(OS_IOS) |
167 PathService::Get(base::DIR_MODULE, &resources_pack_path); | 166 PathService::Get(base::DIR_MODULE, &resources_pack_path); |
168 resources_pack_path = | 167 resources_pack_path = |
169 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); | 168 resources_pack_path.Append(FILE_PATH_LITERAL("resources.pak")); |
170 #else | 169 #else |
171 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); | 170 PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); |
172 #endif | 171 #endif |
173 ResourceBundle::GetSharedInstance().AddDataPackFromPath( | 172 ResourceBundle::GetSharedInstance().AddDataPackFromPath( |
174 resources_pack_path, ui::SCALE_FACTOR_NONE); | 173 resources_pack_path, ui::SCALE_FACTOR_NONE); |
175 } | 174 } |
OLD | NEW |