Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: mojo/services/public/cpp/view_manager/lib/view_manager_test_suite.cc

Issue 477923004: Create native_viewport_service, don't build it into mojo_shell unless Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Try to get gn build working again Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "base/i18n/icu_util.h" 7 #include "base/i18n/icu_util.h"
8 #include "ui/gl/gl_surface.h" 8 #include "ui/gl/gl_surface.h"
9 9
10 #if defined(USE_X11) 10 #if defined(USE_X11)
11 #include "ui/gfx/x/x11_connection.h" 11 #include "ui/gfx/x/x11_connection.h"
12 #endif 12 #endif
13 13
14 namespace mojo { 14 namespace mojo {
15 15
16 ViewManagerTestSuite::ViewManagerTestSuite(int argc, char** argv) 16 ViewManagerTestSuite::ViewManagerTestSuite(int argc, char** argv)
17 : TestSuite(argc, argv) {} 17 : TestSuite(argc, argv) {}
18 18
19 ViewManagerTestSuite::~ViewManagerTestSuite() { 19 ViewManagerTestSuite::~ViewManagerTestSuite() {
20 } 20 }
21 21
22 void ViewManagerTestSuite::Initialize() { 22 void ViewManagerTestSuite::Initialize() {
23 #if defined(USE_X11) 23 #if defined(USE_X11)
24 // Each test ends up creating a new thread for the native viewport service. 24 // 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. 25 // In other words we'll use X on different threads, so tell it that.
26 gfx::InitializeThreadedX11(); 26 gfx::InitializeThreadedX11();
27 #endif 27 #endif
28 28
29 #if defined(COMPONENT_BUILD)
30 gfx::GLSurface::InitializeOneOffForTests();
31 #endif
32
29 base::TestSuite::Initialize(); 33 base::TestSuite::Initialize();
30 gfx::GLSurface::InitializeOneOffForTests();
31 34
32 // base::TestSuite and ViewsInit both try to load icu. That's ok for tests. 35 // base::TestSuite and ViewsInit both try to load icu. That's ok for tests.
33 base::i18n::AllowMultipleInitializeCallsForTesting(); 36 base::i18n::AllowMultipleInitializeCallsForTesting();
34 } 37 }
35 38
36 } // namespace mojo 39 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698