OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h" | 5 #include "mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.h" |
6 | 6 |
7 #include "ui/gl/gl_surface.h" | 7 #include "ui/gl/gl_surface.h" |
8 | 8 |
9 #if defined(USE_X11) | 9 #if defined(USE_X11) |
10 #include "ui/gfx/x/x11_connection.h" | 10 #include "ui/gfx/x/x11_connection.h" |
11 #endif | 11 #endif |
12 | 12 |
13 namespace mojo { | 13 namespace mojo { |
14 namespace view_manager { | |
15 | 14 |
16 ViewManagerTestSuite::ViewManagerTestSuite(int argc, char** argv) | 15 ViewManagerTestSuite::ViewManagerTestSuite(int argc, char** argv) |
17 : TestSuite(argc, argv) {} | 16 : TestSuite(argc, argv) {} |
18 | 17 |
19 ViewManagerTestSuite::~ViewManagerTestSuite() { | 18 ViewManagerTestSuite::~ViewManagerTestSuite() { |
20 } | 19 } |
21 | 20 |
22 void ViewManagerTestSuite::Initialize() { | 21 void ViewManagerTestSuite::Initialize() { |
23 #if defined(USE_X11) | 22 #if defined(USE_X11) |
24 // Each test ends up creating a new thread for the native viewport service. | 23 // Each test ends up creating a new thread for the native viewport service. |
25 // In other words we'll use X on different threads, so tell it that. | 24 // In other words we'll use X on different threads, so tell it that. |
26 gfx::InitializeThreadedX11(); | 25 gfx::InitializeThreadedX11(); |
27 #endif | 26 #endif |
28 | 27 |
29 base::TestSuite::Initialize(); | 28 base::TestSuite::Initialize(); |
30 gfx::GLSurface::InitializeOneOffForTests(); | 29 gfx::GLSurface::InitializeOneOffForTests(); |
31 } | 30 } |
32 | 31 |
33 } // namespace view_manager | |
34 } // namespace mojo | 32 } // namespace mojo |
OLD | NEW |