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 #if defined(OS_ANDROID) | 7 #if defined(OS_ANDROID) |
8 #include <android/native_window.h> | 8 #include <android/native_window.h> |
9 #include <android/native_window_jni.h> | 9 #include <android/native_window_jni.h> |
10 #include <map> | 10 #include <map> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 gfx::InitDeviceScaleFactor(1.0f); | 115 gfx::InitDeviceScaleFactor(1.0f); |
116 #endif | 116 #endif |
117 | 117 |
118 ContentTestSuiteBase::Initialize(); | 118 ContentTestSuiteBase::Initialize(); |
119 { | 119 { |
120 ContentClient client; | 120 ContentClient client; |
121 ContentTestSuiteBase::RegisterContentSchemes(&client); | 121 ContentTestSuiteBase::RegisterContentSchemes(&client); |
122 } | 122 } |
123 RegisterPathProvider(); | 123 RegisterPathProvider(); |
124 #if !defined(OS_IOS) | 124 #if !defined(OS_IOS) |
125 media::InitializeMediaLibraryForTesting(); | 125 media::InitializeMediaLibrary(); |
126 // When running in a child process for Mac sandbox tests, the sandbox exists | 126 // When running in a child process for Mac sandbox tests, the sandbox exists |
127 // to initialize GL, so don't do it here. | 127 // to initialize GL, so don't do it here. |
128 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( | 128 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
129 switches::kTestChildProcess)) { | 129 switches::kTestChildProcess)) { |
130 gfx::GLSurface::InitializeOneOffForTests(); | 130 gfx::GLSurface::InitializeOneOffForTests(); |
131 gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); | 131 gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); |
132 } | 132 } |
133 #endif | 133 #endif |
134 testing::TestEventListeners& listeners = | 134 testing::TestEventListeners& listeners = |
135 testing::UnitTest::GetInstance()->listeners(); | 135 testing::UnitTest::GetInstance()->listeners(); |
136 listeners.Append(new TestInitializationListener); | 136 listeners.Append(new TestInitializationListener); |
137 #if defined(OS_ANDROID) | 137 #if defined(OS_ANDROID) |
138 SurfaceTextureManager::InitInstance(new TestSurfaceTextureManager); | 138 SurfaceTextureManager::InitInstance(new TestSurfaceTextureManager); |
139 #endif | 139 #endif |
140 } | 140 } |
141 | 141 |
142 } // namespace content | 142 } // namespace content |
OLD | NEW |