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

Unified Diff: services/window_manager/run_all_unittests.cc

Issue 1536713004: Revert "Delete the ViewManager and WindowManager services." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
Index: services/window_manager/run_all_unittests.cc
diff --git a/services/window_manager/run_all_unittests.cc b/services/window_manager/run_all_unittests.cc
new file mode 100644
index 0000000000000000000000000000000000000000..f8f67b699cd64ea2999aaac1e56cd7270c1e6e0b
--- /dev/null
+++ b/services/window_manager/run_all_unittests.cc
@@ -0,0 +1,43 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/bind.h"
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_suite.h"
+#include "ui/gl/gl_surface.h"
+
+#if defined(USE_X11)
+#include "ui/gfx/x/x11_connection.h"
+#endif
+
+namespace window_manager {
+
+class WindowManagerTestSuite : public base::TestSuite {
+ public:
+ WindowManagerTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
+ ~WindowManagerTestSuite() override {}
+
+ protected:
+ void Initialize() override {
+#if defined(USE_X11)
+ // Each test ends up creating a new thread for the native viewport service.
+ // In other words we'll use X on different threads, so tell it that.
+ gfx::InitializeThreadedX11();
+#endif
+ base::TestSuite::Initialize();
+ gfx::GLSurface::InitializeOneOffForTests();
+ }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(WindowManagerTestSuite);
+};
+
+} // namespace window_manager
+
+int main(int argc, char** argv) {
+ window_manager::WindowManagerTestSuite test_suite(argc, argv);
+
+ return base::LaunchUnitTests(
+ argc, argv, base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite)));
+}
« no previous file with comments | « services/window_manager/native_viewport_event_dispatcher_impl.cc ('k') | services/window_manager/view_event_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698