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 "chrome/test/base/chrome_test_suite.h" | 5 #include "chrome/test/base/chrome_test_suite.h" |
6 | 6 |
7 #if defined(OS_CHROMEOS) | 7 #if defined(OS_CHROMEOS) |
8 #include <stdio.h> | 8 #include <stdio.h> |
9 #include <unistd.h> | 9 #include <unistd.h> |
10 #endif | 10 #endif |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 !IsCrosPythonProcess()); | 185 !IsCrosPythonProcess()); |
186 | 186 |
187 // Initialize after overriding paths as some content paths depend on correct | 187 // Initialize after overriding paths as some content paths depend on correct |
188 // values for DIR_EXE and DIR_MODULE. | 188 // values for DIR_EXE and DIR_MODULE. |
189 content::ContentTestSuiteBase::Initialize(); | 189 content::ContentTestSuiteBase::Initialize(); |
190 | 190 |
191 #if !defined(OS_IOS) | 191 #if !defined(OS_IOS) |
192 // For browser tests, a full chrome instance is initialized which will set up | 192 // For browser tests, a full chrome instance is initialized which will set up |
193 // GLSurface itself. For unit tests, we need to set this up for them. | 193 // GLSurface itself. For unit tests, we need to set this up for them. |
194 if (!IsBrowserTestSuite()) | 194 if (!IsBrowserTestSuite()) |
195 gfx::GLSurface::InitializeOneOffForTests(true); | 195 gfx::GLSurface::InitializeOneOffForTests(); |
196 #endif | 196 #endif |
197 | 197 |
198 #if defined(OS_MACOSX) && !defined(OS_IOS) | 198 #if defined(OS_MACOSX) && !defined(OS_IOS) |
199 // Look in the framework bundle for resources. | 199 // Look in the framework bundle for resources. |
200 base::FilePath path; | 200 base::FilePath path; |
201 PathService::Get(base::DIR_EXE, &path); | 201 PathService::Get(base::DIR_EXE, &path); |
202 path = path.Append(chrome::kFrameworkName); | 202 path = path.Append(chrome::kFrameworkName); |
203 base::mac::SetOverrideFrameworkBundlePath(path); | 203 base::mac::SetOverrideFrameworkBundlePath(path); |
204 #endif | 204 #endif |
205 | 205 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 #if defined(OS_MACOSX) && !defined(OS_IOS) | 238 #if defined(OS_MACOSX) && !defined(OS_IOS) |
239 base::mac::SetOverrideFrameworkBundle(NULL); | 239 base::mac::SetOverrideFrameworkBundle(NULL); |
240 #endif | 240 #endif |
241 | 241 |
242 base::StatsTable::set_current(NULL); | 242 base::StatsTable::set_current(NULL); |
243 stats_table_.reset(); | 243 stats_table_.reset(); |
244 RemoveSharedMemoryFile(stats_filename_); | 244 RemoveSharedMemoryFile(stats_filename_); |
245 | 245 |
246 content::ContentTestSuiteBase::Shutdown(); | 246 content::ContentTestSuiteBase::Shutdown(); |
247 } | 247 } |
OLD | NEW |