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
3 // found in the LICENSE file.
6 #include "base/test/launcher/unit_test_launcher.h"
7 #include "base/test/test_suite.h"
8 #include "ui/gl/gl_surface.h"
11 #include "ui/gfx/x/x11_connection.h"
16 class WindowManagerTestSuite
: public base::TestSuite
{
18 WindowManagerTestSuite(int argc
, char** argv
) : TestSuite(argc
, argv
) {}
19 virtual ~WindowManagerTestSuite() {}
22 virtual void Initialize() OVERRIDE
{
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.
26 gfx::InitializeThreadedX11();
28 base::TestSuite::Initialize();
29 gfx::GLSurface::InitializeOneOffForTests();
33 DISALLOW_COPY_AND_ASSIGN(WindowManagerTestSuite
);
38 int main(int argc
, char** argv
) {
39 mojo::WindowManagerTestSuite
test_suite(argc
, argv
);
41 return base::LaunchUnitTests(
42 argc
, argv
, base::Bind(&TestSuite::Run
, base::Unretained(&test_suite
)));