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

Side by Side Diff: mojo/services/window_manager/run_all_unittests.cc

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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
OLDNEW
(Empty)
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.
4
5 #include "base/bind.h"
6 #include "base/test/launcher/unit_test_launcher.h"
7 #include "base/test/test_suite.h"
8 #include "ui/gl/gl_surface.h"
9
10 #if defined(USE_X11)
11 #include "ui/gfx/x/x11_connection.h"
12 #endif
13
14 namespace window_manager {
15
16 class WindowManagerTestSuite : public base::TestSuite {
17 public:
18 WindowManagerTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
19 ~WindowManagerTestSuite() override {}
20
21 protected:
22 void Initialize() override {
23 #if defined(USE_X11)
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();
27 #endif
28 base::TestSuite::Initialize();
29 gfx::GLSurface::InitializeOneOffForTests();
30 }
31
32 private:
33 DISALLOW_COPY_AND_ASSIGN(WindowManagerTestSuite);
34 };
35
36 } // namespace window_manager
37
38 int main(int argc, char** argv) {
39 window_manager::WindowManagerTestSuite test_suite(argc, argv);
40
41 return base::LaunchUnitTests(
42 argc, argv, base::Bind(&TestSuite::Run, base::Unretained(&test_suite)));
43 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698