| 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 "content/test/content_test_suite.h" | 5 #include "content/test/content_test_suite.h" |
| 6 | 6 |
| 7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "content/public/test/test_content_client_initializer.h" | 10 #include "content/public/test/test_content_client_initializer.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 void ContentTestSuite::Initialize() { | 67 void ContentTestSuite::Initialize() { |
| 68 #if defined(OS_MACOSX) | 68 #if defined(OS_MACOSX) |
| 69 base::mac::ScopedNSAutoreleasePool autorelease_pool; | 69 base::mac::ScopedNSAutoreleasePool autorelease_pool; |
| 70 #endif | 70 #endif |
| 71 | 71 |
| 72 ContentTestSuiteBase::Initialize(); | 72 ContentTestSuiteBase::Initialize(); |
| 73 #if !defined(OS_IOS) | 73 #if !defined(OS_IOS) |
| 74 // When running in a child process for Mac sandbox tests, the sandbox exists | 74 // When running in a child process for Mac sandbox tests, the sandbox exists |
| 75 // to initialize GL, so don't do it here. | 75 // to initialize GL, so don't do it here. |
| 76 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestChildProcess)) | 76 if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestChildProcess)) |
| 77 gfx::GLSurface::InitializeOneOffForTests(true); | 77 gfx::GLSurface::InitializeOneOffForTests(); |
| 78 #endif | 78 #endif |
| 79 testing::TestEventListeners& listeners = | 79 testing::TestEventListeners& listeners = |
| 80 testing::UnitTest::GetInstance()->listeners(); | 80 testing::UnitTest::GetInstance()->listeners(); |
| 81 listeners.Append(new TestInitializationListener); | 81 listeners.Append(new TestInitializationListener); |
| 82 } | 82 } |
| 83 | 83 |
| 84 ContentClient* ContentTestSuite::CreateClientForInitialization() { | 84 ContentClient* ContentTestSuite::CreateClientForInitialization() { |
| 85 return new TestContentClient(); | 85 return new TestContentClient(); |
| 86 } | 86 } |
| 87 | 87 |
| 88 } // namespace content | 88 } // namespace content |
| OLD | NEW |